about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-07-21 06:52:27 +0200
committerGitHub <noreply@github.com>2023-07-21 06:52:27 +0200
commit20ce7f17c7c78ed189b1f20b3e9e0ec788da1732 (patch)
tree05ac676222e22de23594d525efcfaed23052cdc3 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parentd26f0b79d57a4e688e8fdee1e22818a0a71ab0de (diff)
parent77d09cb69e7e459b6eee9d7564844c73064b2e84 (diff)
downloadrust-20ce7f17c7c78ed189b1f20b3e9e0ec788da1732.tar.gz
rust-20ce7f17c7c78ed189b1f20b3e9e0ec788da1732.zip
Rollup merge of #113380 - joshtriplett:style-guide-cleanup-must-should-may, r=calebcartwright
style-guide: clean up "must"/"should"/"may"

Avoid using "should" or "may" for required parts of the default style.

The style guide inconsistently used language like "there should be a space" or
"it should be on its own line", or "may be written on a single line", for
things that are required components of the default Rust style. "should" and
especially "may" come across as optional. While the style guide overall now has
a statement at the top that the default style itself is a *recommendation*, the
*definition* of the default style should not be ambiguous about what's part of
the default style.

Rewrite language in the style guide to only use "should" and "may" and similar
for truly optional components of the style (e.g. things a tool cannot or should
not enforce in its default configuration).

In their place, either use "must", or rewrite in imperative style ("put a
space", "start it on the same line"). The latter also substantially reduces the
use of passive voice.

Looking for "should"s also flagged some recommendations the style guide made
for configurability of tools (e.g. a tool "should" have a given configuration
option). I've removed those recommendations, per discussion with the style
team; it's not the domain of the style guide to make such recommendations, only
to define the default Rust style.

In the process of making this change, I also fixed a typo, fixed a text structure
issue, fixed an example that didn't match the Rust style (missing a trailing
comma), and added an additional example for clarity. (Those changes would have
conflicted with this one.) Those changes appear in separate commits.

These are all purely editorial changes, and do not affect the semantic
definition of the Rust style.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions