Skip to content

Commit 3715fc6

Browse files
committed
style-guide: Document absence of trailing whitespace
1 parent 6ba0ce4 commit 3715fc6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/doc/style-guide/src/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ fn bar() {}
112112
fn baz() {}
113113
```
114114

115+
### Trailing whitespace
116+
117+
Do not include trailing whitespace on the end of any line. This includes blank
118+
lines, comment lines, and code lines.
119+
115120
### Sorting
116121

117122
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.
225230

226231
Prefer to put a comment on its own line. Where a comment follows code, put a
227232
single space before it. Where a block comment appears inline, use surrounding
228-
whitespace as if it were an identifier or keyword. Do not include trailing
229-
whitespace after a comment or at the end of any line in a multi-line comment.
233+
whitespace as if it were an identifier or keyword.
234+
230235
Examples:
231236

232237
```rust

0 commit comments

Comments
 (0)