bors ce339b219a 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
..
2021-12-13 00:00:51 +00:00
2021-12-13 00:00:51 +00:00
2022-09-02 13:03:11 -05:00
2022-06-16 18:00:32 +04:00
2021-12-13 00:00:51 +00:00
2021-12-13 00:00:51 +00:00
2022-06-16 18:00:32 +04:00
2022-06-16 15:51:12 +03:00
2021-12-13 17:09:16 +00:00
2022-08-31 15:24:40 +02:00
2022-06-16 18:00:32 +04:00
2022-06-16 15:51:12 +03:00
2022-06-16 15:51:12 +03:00
2022-06-16 15:51:12 +03:00
2022-06-16 15:51:12 +03:00
2021-12-12 12:34:21 +00:00
2021-12-12 12:34:21 +00:00
2022-06-16 15:51:12 +03:00
2022-06-16 18:00:32 +04:00
2022-04-17 11:03:34 +02:00
2022-06-16 15:51:12 +03:00
2022-06-16 15:51:12 +03:00
2022-06-16 15:51:12 +03:00