diff options
| author | bors <bors@rust-lang.org> | 2022-09-06 03:16:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-06 03:16:29 +0000 |
| commit | 6c358c67d4d39b1b4dbbcee89e96ec748d771e9e (patch) | |
| tree | 0b408a0a95a82676690a365e92530600e2a78874 /compiler/rustc_codegen_gcc/src/errors.rs | |
| parent | 56b27110e7f72ea01312d99f1b1e0577431cbbd0 (diff) | |
| parent | 9ea82d57e296efd6dfc0cb0a6c4c09f4111c123d (diff) | |
| download | rust-6c358c67d4d39b1b4dbbcee89e96ec748d771e9e.tar.gz rust-6c358c67d4d39b1b4dbbcee89e96ec748d771e9e.zip | |
Auto merge of #101241 - camsteffen:refactor-binding-annotations, r=cjgillot
`BindingAnnotation` refactor
* `ast::BindingMode` is deleted and replaced with `hir::BindingAnnotation` (which is moved to `ast`)
* `BindingAnnotation` is changed from an enum to a tuple struct e.g. `BindingAnnotation(ByRef::No, Mutability::Mut)`
* Associated constants added for convenience `BindingAnnotation::{NONE, REF, MUT, REF_MUT}`
One goal is to make it more clear that `BindingAnnotation` merely represents syntax `ref mut` and not the actual binding mode. This was especially confusing since we had `ast::BindingMode`->`hir::BindingAnnotation`->`thir::BindingMode`.
I wish there were more symmetry between `ByRef` and `Mutability` (variant) naming (maybe `Mutable::Yes`?), and I also don't love how long the name `BindingAnnotation` is, but this seems like the best compromise. Ideas welcome.
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
