rust/clippy_lints/src/loops
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
..
empty_loop.rs
explicit_counter_loop.rs Merge commit 'fdb84cbfd25908df5683f8f62388f663d9260e39' into clippyup 2022-07-18 09:39:37 +02:00
explicit_into_iter_loop.rs
explicit_iter_loop.rs
for_kv_map.rs
for_loops_over_fallibles.rs
iter_next_loop.rs
manual_find.rs clippy: BindingAnnotation change 2022-09-02 13:03:11 -05:00
manual_flatten.rs Merge commit 'fdb84cbfd25908df5683f8f62388f663d9260e39' into clippyup 2022-07-18 09:39:37 +02:00
manual_memcpy.rs separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
missing_spin_loop.rs separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
mod.rs separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
mut_range_bound.rs clippy: BindingAnnotation change 2022-09-02 13:03:11 -05:00
needless_collect.rs separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
needless_range_loop.rs separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
never_loop.rs separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
same_item_push.rs Auto merge of #101241 - camsteffen:refactor-binding-annotations, r=cjgillot 2022-09-06 03:16:29 +00:00
single_element_loop.rs separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
utils.rs move else block into the Local struct 2022-07-11 23:20:37 +02:00
while_immutable_condition.rs
while_let_loop.rs separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
while_let_on_iterator.rs separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00