rust/clippy_lints/src/loops
Kevin Reid 0f5338cd90 For restriction lints, replace “Why is this bad?” with “Why restrict this?”
The `restriction` group contains many lints which are not about
necessarily “bad” things, but style choices — perhaps even style choices
which contradict conventional Rust style — or are otherwise very
situational. This results in silly wording like “Why is this bad?
It isn't, but ...”, which I’ve seen confuse a newcomer at least once.

To improve this situation, this commit replaces the “Why is this bad?”
section heading with “Why restrict this?”, for most, but not all,
restriction lints. I left alone the ones whose placement in the
restriction group is more incidental.

In order to make this make sense, I had to remove the “It isn't, but”
texts from the contents of the sections. Sometimes further changes
were needed, or there were obvious fixes to make, and I went ahead
and made those changes without attempting to split them into another
commit, even though many of them are not strictly necessary for the
“Why restrict this?” project.
2024-05-23 15:51:33 -07:00
..
empty_loop.rs Merge commit '97a5daa659' into clippyup 2022-01-13 13:18:19 +01:00
explicit_counter_loop.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
explicit_into_iter_loop.rs Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00
explicit_iter_loop.rs And the tools too 2024-03-22 11:13:29 -04:00
for_kv_map.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
infinite_loop.rs Merge commit '10136170fe' into clippy-subtree-update 2024-02-27 15:50:17 +01:00
iter_next_loop.rs deprecate clippy::for_loops_over_fallibles 2022-10-09 13:07:21 +00:00
manual_find.rs Rename BindingAnnotation to BindingMode 2024-04-17 09:34:39 -04:00
manual_flatten.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
manual_memcpy.rs Rename hir::StmtKind::Local into hir::StmtKind::Let 2024-03-14 12:42:04 +01:00
manual_while_let_some.rs Rename hir::StmtKind::Local into hir::StmtKind::Let 2024-03-14 12:42:04 +01:00
missing_spin_loop.rs Merge commit 'edb720b199' into clippyup 2023-11-16 19:13:24 +01:00
mod.rs For restriction lints, replace “Why is this bad?” with “Why restrict this?” 2024-05-23 15:51:33 -07:00
mut_range_bound.rs Merge remote-tracking branch 'upstream/master' into rustup 2024-05-16 14:20:56 -07:00
needless_range_loop.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
never_loop.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
same_item_push.rs Rename BindingAnnotation to BindingMode 2024-04-17 09:34:39 -04:00
single_element_loop.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
unused_enumerate_index.rs Merge commit '20b085d500' into clippy-subtree-update 2024-05-02 17:26:44 +02:00
utils.rs Rename hir::Local into hir::LetStmt 2024-03-22 20:36:21 +01:00
while_float.rs Lint while loops with float comparison 2024-05-06 00:04:00 +02:00
while_immutable_condition.rs Merge commit '9d6f41691e' into clippy-subtree-update 2024-03-21 22:20:40 +01:00
while_let_loop.rs Rename hir::Local into hir::LetStmt 2024-03-22 20:36:21 +01:00
while_let_on_iterator.rs Rename hir::Local into hir::LetStmt 2024-03-22 20:36:21 +01:00