Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
style-guide: Document absence of trailing whitespace
  • Loading branch information
joshtriplett committed Aug 22, 2025
commit 3715fc623a8464d27601309693b826063564bfcd
9 changes: 7 additions & 2 deletions src/doc/style-guide/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading