Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move style guide to rust-lang/rust #102239

Merged
merged 4 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
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
Prev Previous commit
Next Next commit
style-guide: Remove trailing space
  • Loading branch information
joshtriplett committed Sep 24, 2022
commit 283c0e43caf6d61f4fdaf1320904cd34d7abff9e
4 changes: 2 additions & 2 deletions src/doc/style-guide/src/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Use parentheses liberally, do not necessarily elide them due to precedence.
Tools should not automatically insert or remove parentheses. Do not use spaces
to indicate precedence.

If line-breaking, put the operator on a new line and block indent. Put each
If line-breaking, put the operator on a new line and block indent. Put each
sub-expression on its own line. E.g.,

```rust
Expand Down Expand Up @@ -595,7 +595,7 @@ let x = match foo.bar.baz() {
};
```

Use a trailing comma for a match arm if and only if not using a block.
Use a trailing comma for a match arm if and only if not using a block.

Never start a match arm pattern with `|`, e.g.,

Expand Down
4 changes: 2 additions & 2 deletions src/doc/style-guide/src/items.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pulled down to its own line and indented again.
```rust
struct Foo {
a: A,
long_name:
long_name:
LongType,
}
```
Expand All @@ -129,7 +129,7 @@ The same guidelines are used for untagged union declarations.
union Foo {
a: A,
b: B,
long_name:
long_name:
LongType,
}
```
Expand Down
4 changes: 2 additions & 2 deletions src/doc/style-guide/src/statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ let foo:
ALongType =
{
an_expression();
...
...
};

let Foo {
f: abcd,
g: qwer,
}: Foo<Bar> = Foo {
f: blimblimblim,
f: blimblimblim,
g: blamblamblam,
};

Expand Down