diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-06-23 13:18:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-23 13:18:16 +0200 |
| commit | 8d6b02fb3b832d9e96efe5a9f4845570039f8805 (patch) | |
| tree | e84005a310baf590afd402010d801a2f134a44c1 | |
| parent | 441e59ad6c81fb1b65c0c3f20a11752aa8168760 (diff) | |
| parent | 2748efaba3ed81de50a8e23ce72c9bb214e11fe5 (diff) | |
| download | rust-8d6b02fb3b832d9e96efe5a9f4845570039f8805.tar.gz rust-8d6b02fb3b832d9e96efe5a9f4845570039f8805.zip | |
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".
| -rw-r--r-- | src/doc/style-guide/src/README.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/doc/style-guide/src/README.md b/src/doc/style-guide/src/README.md index 2ad834f804b..75013bb3df9 100644 --- a/src/doc/style-guide/src/README.md +++ b/src/doc/style-guide/src/README.md @@ -19,6 +19,18 @@ Thus, there are productivity benefits to using a formatting tool (such as `rustfmt`), and even larger benefits by using a community-consistent formatting, typically by using a formatting tool's default settings. +## The default Rust style + +The Rust Style Guide defines the default Rust style, and *recommends* that +developers and tools follow the default Rust style. Tools such as `rustfmt` use +the style guide as a reference for the default style. Everything in this style +guide, whether or not it uses language such as "must" or the imperative mood +such as "insert a space ..." or "break the line after ...", refers to the +default style. + +This should not be interpreted as forbidding developers from following a +non-default style, or forbidding tools from adding any particular configuration +options. ## Formatting conventions |
