-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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`.
- Loading branch information
1 parent
705b484
commit 8c6b69f
Showing
3 changed files
with
16 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters