diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2025-08-21 18:34:59 -0700 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2025-08-21 18:34:59 -0700 |
| commit | 3715fc623a8464d27601309693b826063564bfcd (patch) | |
| tree | fb92720e3a034726072cfc162dbb45a40e98b826 | |
| parent | 6ba0ce40941eee1ca02e9ba49c791ada5158747a (diff) | |
| download | rust-3715fc623a8464d27601309693b826063564bfcd.tar.gz rust-3715fc623a8464d27601309693b826063564bfcd.zip | |
style-guide: Document absence of trailing whitespace
| -rw-r--r-- | src/doc/style-guide/src/README.md | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/doc/style-guide/src/README.md b/src/doc/style-guide/src/README.md index f42b9cb5978..a20f62d65a5 100644 --- a/src/doc/style-guide/src/README.md +++ b/src/doc/style-guide/src/README.md @@ -112,6 +112,11 @@ fn bar() {} fn baz() {} ``` +### Trailing whitespace + +Do not include trailing whitespace on the end of any line. This includes blank +lines, comment lines, and code lines. + ### Sorting In various cases, the default Rust style specifies to sort things. If not @@ -225,8 +230,8 @@ newline after the opening sigil, and a newline before the closing sigil. Prefer to put a comment on its own line. Where a comment follows code, put a single space before it. Where a block comment appears inline, use surrounding -whitespace as if it were an identifier or keyword. Do not include trailing -whitespace after a comment or at the end of any line in a multi-line comment. +whitespace as if it were an identifier or keyword. + Examples: ```rust |
