ce339b219a
`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. |
||
---|---|---|
.. | ||
collapsible_match.rs | ||
infallible_destructuring_match.rs | ||
manual_map.rs | ||
manual_unwrap_or.rs | ||
match_as_ref.rs | ||
match_bool.rs | ||
match_like_matches.rs | ||
match_on_vec_items.rs | ||
match_ref_pats.rs | ||
match_same_arms.rs | ||
match_single_binding.rs | ||
match_str_case_mismatch.rs | ||
match_wild_enum.rs | ||
match_wild_err_arm.rs | ||
mod.rs | ||
needless_match.rs | ||
overlapping_arms.rs | ||
redundant_pattern_match.rs | ||
rest_pat_in_fully_bound_struct.rs | ||
significant_drop_in_scrutinee.rs | ||
single_match.rs | ||
try_err.rs | ||
wild_in_or_pats.rs |