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

Add style checks. #886

Merged
merged 6 commits into from
Oct 6, 2020
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
Trim trailing whitespace and ensure files end with a newline.
  • Loading branch information
ehuss committed Sep 15, 2020
commit b2d11240bd9a3a6dd34419d0b0ba74617b23d77e
8 changes: 4 additions & 4 deletions src/attributes/codegen.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ otherwise undefined behavior results.

### Behavior

Applying the attribute to a function `f` allows code within `f` to get a hint of the [`Location`] of
the "topmost" tracked call that led to `f`'s invocation. At the point of observation, an
implementation behaves as if it walks up the stack from `f`'s frame to find the nearest frame of an
Applying the attribute to a function `f` allows code within `f` to get a hint of the [`Location`] of
the "topmost" tracked call that led to `f`'s invocation. At the point of observation, an
implementation behaves as if it walks up the stack from `f`'s frame to find the nearest frame of an
*unattributed* function `outer`, and it returns the [`Location`] of the tracked call in `outer`.

```rust
Expand Down Expand Up @@ -190,7 +190,7 @@ fn calls_f() {
```

When `f` is called by another attributed function `g` which is in turn called by `calls_g`, code in
both `f` and `g` observes `g`'s callsite within `calls_g`:
both `f` and `g` observes `g`'s callsite within `calls_g`:

```rust
# #[track_caller]
Expand Down
2 changes: 1 addition & 1 deletion src/destructors.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ smallest scope that contains the expression and is for one of the following:
* The second operand of a [lazy boolean expression].

> **Notes**:
>
>
> Temporaries that are created in the final expression of a function
> body are dropped *after* any named variables bound in the function body, as
> there is no smaller enclosing temporary scope.
Expand Down
8 changes: 4 additions & 4 deletions src/expressions/closure-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
> _ClosureParam_ :\
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup> [_Pattern_]&nbsp;( `:` [_Type_] )<sup>?</sup>

A _closure expression_, also know as a lambda expression or a lambda, defines a
closure and denotes it as a value, in a single expression. A closure expression
is a pipe-symbol-delimited (`|`) list of irrefutable [patterns] followed by an
expression. Type annotations may optionally be added for the type of the
A _closure expression_, also know as a lambda expression or a lambda, defines a
closure and denotes it as a value, in a single expression. A closure expression
is a pipe-symbol-delimited (`|`) list of irrefutable [patterns] followed by an
expression. Type annotations may optionally be added for the type of the
parameters or for the return type. If there is a return type, the expression
used for the body of the closure must be a normal [block]. A closure expression
also may begin with the `move` keyword before the initial `|`.
Expand Down
14 changes: 7 additions & 7 deletions src/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ function* or a *free const*. Contrast to an [associated item].

### Fundamental traits

A fundamental trait is one where adding an impl of it for an existing type is a breaking change.
A fundamental trait is one where adding an impl of it for an existing type is a breaking change.
The `Fn` traits and `Sized` are fundamental.

### Fundamental type constructors

A fundamental type constructor is a type where implementing a [blanket implementation](#blanket-implementation) over it
is a breaking change. `&`, `&mut`, `Box`, and `Pin` are fundamental.
A fundamental type constructor is a type where implementing a [blanket implementation](#blanket-implementation) over it
is a breaking change. `&`, `&mut`, `Box`, and `Pin` are fundamental.

Any time a type `T` is considered [local](#local-type), `&T`, `&mut T`, `Box<T>`, and `Pin<T>`
are also considered local. Fundamental type constructors cannot [cover](#uncovered-type) other types.
Any time the term "covered type" is used,
Any time a type `T` is considered [local](#local-type), `&T`, `&mut T`, `Box<T>`, and `Pin<T>`
are also considered local. Fundamental type constructors cannot [cover](#uncovered-type) other types.
Any time the term "covered type" is used,
the `T` in `&T`, `&mut T`, `Box<T>`, and `Pin<T>` is not considered covered.

### Inhabited
Expand Down Expand Up @@ -120,7 +120,7 @@ or not independent of applied type arguments. Given `trait Foo<T, U>`,

A `struct`, `enum`, or `union` which was defined in the current crate.
This is not affected by applied type arguments. `struct Foo` is considered local, but
`Vec<Foo>` is not. `LocalType<ForeignType>` is local. Type aliases do not
`Vec<Foo>` is not. `LocalType<ForeignType>` is local. Type aliases do not
affect locality.

### Nominal types
Expand Down
2 changes: 1 addition & 1 deletion src/items/implementations.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ least one of the following is true:

Only the appearance of *uncovered* type parameters is restricted.
Note that for the purposes of coherence, [fundamental types] are
special. The `T` in `Box<T>` is not considered covered, and `Box<LocalType>`
special. The `T` in `Box<T>` is not considered covered, and `Box<LocalType>`
is considered local.


Expand Down
4 changes: 2 additions & 2 deletions src/type-coercions.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Type coercions

**Type coercions** are implicit operations that change the type of a value.
They happen automatically at specific locations and are highly restricted in
They happen automatically at specific locations and are highly restricted in
what types actually coerce.

Any conversions allowed by coercion can also be explicitly performed by the
Expand Down Expand Up @@ -55,7 +55,7 @@ sites are:
Foo { x: &mut 42 };
}
```

* Function results&mdash;either the final line of a block if it is not
semicolon-terminated or any expression in a `return` statement

Expand Down
2 changes: 1 addition & 1 deletion src/types/function-pointer.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ restrictions as [regular function parameters].
[extern function]: ../items/functions.md#extern-function-qualifier
[function items]: function-item.md
[unsafe function]: ../unsafe-functions.md
[regular function parameters]: ../items/functions.md#attributes-on-function-parameters
[regular function parameters]: ../items/functions.md#attributes-on-function-parameters