rust/compiler/rustc_ast
Nicholas Nethercote d9fef774e3 Remove hir::BinOp, hir::BinOpKind, and hir::UnOp.
They're identical to the same-named types from `ast`. I find it silly
(and inefficient) to have all this boilerplate code to convert one type
to an identical type.

There is already a small amount of type sharing between the AST and HIR,
e.g. `Attribute`, `MacroDef`.

The commit adds a `pub use` to `rustc_hir` so that, for example,
`ast::BinOp` can also be referred to as `hir::BinOp`. This is so the
many existing `hir`-qualified mentions of these types don't need to
change.

The commit also moves a couple of operations from the (removed) HIR
types to the AST types, e.g. `is_by_value`.
2023-11-28 12:14:25 +11:00
..
src Remove hir::BinOp, hir::BinOpKind, and hir::UnOp. 2023-11-28 12:14:25 +11:00
Cargo.toml Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
README.md docs(rustc_ast): update crate descriptions 2021-11-02 21:11:17 -05:00

The rustc_ast crate contains those things concerned purely with syntax that is, the AST ("abstract syntax tree"), along with some definitions for tokens and token streams, data structures/traits for mutating ASTs, and shared definitions for other AST-related parts of the compiler (like the lexer and macro-expansion).

For more information about how these things work in rustc, see the rustc dev guide: