rust/clippy_lints/src/casts
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
..
as_ptr_cast_mut.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
as_underscore.rs Merge commit 'f51aade56f' into clippyup 2022-08-31 09:24:45 -04:00
borrow_as_ptr.rs Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00
cast_abs_to_unsigned.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
cast_enum_constructor.rs Merge commit 'd0cf3481a8' into clippyup 2022-03-24 14:50:04 +01:00
cast_lossless.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
cast_nan_to_int.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
cast_possible_truncation.rs Fixed reduction of & in cast_possible_truncation 2024-04-28 16:01:33 +02:00
cast_possible_wrap.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
cast_precision_loss.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
cast_ptr_alignment.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
cast_sign_loss.rs Update doc comments to avoid lazy continuations 2024-05-06 16:31:23 -07:00
cast_slice_different_sizes.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
cast_slice_from_raw_parts.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
char_lit_as_u8.rs Merge commit 'edb720b199' into clippyup 2023-11-16 19:13:24 +01:00
fn_to_numeric_cast.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
fn_to_numeric_cast_any.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
fn_to_numeric_cast_with_truncation.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
mod.rs For restriction lints, replace “Why is this bad?” with “Why restrict this?” 2024-05-23 15:51:33 -07:00
ptr_as_ptr.rs Fix clippy 2024-04-15 18:48:12 -04:00
ptr_cast_constness.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
ref_as_ptr.rs Rollup merge of #122780 - GuillaumeGomez:rename-hir-local, r=oli-obk 2024-03-23 15:00:18 +01:00
unnecessary_cast.rs Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
utils.rs Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
zero_ptr.rs Merge commit '7671c283a5' into clippyup 2023-09-25 11:28:58 +02:00