rust/compiler/rustc_ast_pretty/src
bors 6c358c67d4 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.
2022-09-06 03:16:29 +00:00
..
pp Pretty print ItemKind::Use in rustfmt style 2022-02-07 21:51:05 -08:00
pprust Auto merge of #101241 - camsteffen:refactor-binding-annotations, r=cjgillot 2022-09-06 03:16:29 +00:00
helpers.rs Delete duplicated helpers from HIR printer 2021-12-05 12:45:51 -08:00
lib.rs Add diagnostic translation lints to crates that don't emit them 2022-08-18 19:29:02 +01:00
pp.rs fix most compiler/ doctests 2022-05-02 17:40:30 -07:00