rust/clippy_lints/src/matches
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
..
collapsible_match.rs Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup 2022-06-04 13:34:07 +02:00
infallible_destructuring_match.rs Merge commit '7c21f91b15b7604f818565646b686d90f99d1baf' into clippyup 2022-05-05 15:12:52 +01:00
manual_map.rs clippy: BindingAnnotation change 2022-09-02 13:03:11 -05:00
manual_unwrap_or.rs Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup 2022-06-04 13:34:07 +02:00
match_as_ref.rs clippy: BindingAnnotation change 2022-09-02 13:03:11 -05:00
match_bool.rs Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup 2022-06-04 13:34:07 +02:00
match_like_matches.rs Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup 2022-08-31 09:24:45 -04:00
match_on_vec_items.rs Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup 2022-06-04 13:34:07 +02:00
match_ref_pats.rs
match_same_arms.rs Remove the symbol from ast::LitKind::Err. 2022-08-23 16:56:24 +10:00
match_single_binding.rs Merge commit '0cb0f7636851f9fcc57085cf80197a2ef6db098f' into clippyup 2022-06-30 10:50:09 +02:00
match_str_case_mismatch.rs separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
match_wild_enum.rs Merge 'rust-clippy/master' into clippyup 2022-05-21 13:24:00 +02:00
match_wild_err_arm.rs
mod.rs Merge commit '2b2190cb5667cdd276a24ef8b9f3692209c54a89' into clippyup 2022-08-11 19:42:16 +02:00
needless_match.rs clippy: BindingAnnotation change 2022-09-02 13:03:11 -05:00
overlapping_arms.rs fix clippy test failures 2022-06-14 16:08:11 +02:00
redundant_pattern_match.rs separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
rest_pat_in_fully_bound_struct.rs Merge commit '7c21f91b15b7604f818565646b686d90f99d1baf' into clippyup 2022-05-05 15:12:52 +01:00
significant_drop_in_scrutinee.rs separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
single_match.rs clippy: BindingAnnotation change 2022-09-02 13:03:11 -05:00
try_err.rs Merge commit '2b2190cb5667cdd276a24ef8b9f3692209c54a89' into clippyup 2022-08-11 19:42:16 +02:00
wild_in_or_pats.rs