Skip to content

Commit 8d6b02f

Browse files
authored
Rollup merge of #112944 - joshtriplett:style-guide-defaults-vs-configurability, r=compiler-errors
style-guide: Add language disclaiming any effects on non-default Rust styles Make it clear that the style guide saying "must" doesn't forbid developers from doing differently (as though any power on this Earth could do that) and doesn't forbid tools from allowing any particular configuration options. Otherwise, people might wonder (for instance) if there's a semantic difference between "must" and "should" in the style guide, and whether tools are "allowed" to offer configurability of something that says "must".
2 parents 441e59a + 2748efa commit 8d6b02f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: src/doc/style-guide/src/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ Thus, there are productivity benefits to using a formatting tool (such as
1919
`rustfmt`), and even larger benefits by using a community-consistent
2020
formatting, typically by using a formatting tool's default settings.
2121

22+
## The default Rust style
23+
24+
The Rust Style Guide defines the default Rust style, and *recommends* that
25+
developers and tools follow the default Rust style. Tools such as `rustfmt` use
26+
the style guide as a reference for the default style. Everything in this style
27+
guide, whether or not it uses language such as "must" or the imperative mood
28+
such as "insert a space ..." or "break the line after ...", refers to the
29+
default style.
30+
31+
This should not be interpreted as forbidding developers from following a
32+
non-default style, or forbidding tools from adding any particular configuration
33+
options.
2234

2335
## Formatting conventions
2436

0 commit comments

Comments
 (0)