about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-24 12:58:25 +0000
committerbors <bors@rust-lang.org>2024-05-24 12:58:25 +0000
commit67b7b6a60714976b6b066d087f44385b025c0a07 (patch)
tree107a0012ff6624722bbac26b0d601babd8f04b0a /compiler/rustc_codegen_llvm/src
parent76856ffb576fb2dff472481a6389d42ca836db6f (diff)
parent0f5338cd903c715d411dee6af95f076177914e42 (diff)
downloadrust-67b7b6a60714976b6b066d087f44385b025c0a07.tar.gz
rust-67b7b6a60714976b6b066d087f44385b025c0a07.zip
Auto merge of #12838 - kpreid:restriction-doc, r=llogiq
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 and distress a newcomer at least once.

To improve this situation, this PR 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; it seemed to me that it was more valuable to grab the low-hanging fruit than to be careful about it.

changelog: rephrased the documentation of `restriction` lints for clarity about their nature
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions