Skip to content

Commit

Permalink
fix(compiler): correct minor typos in some long error code explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestiotio committed Jan 11, 2022
1 parent 89b9f7b commit 842bf71
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_error_codes/src/error_codes/E0038.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Two general aspects of trait object types give rise to the restrictions:
these types can only be accessed through pointers, such as `&dyn Trait` or
`Box<dyn Trait>`. The size of such a pointer is known, but the size of the
`dyn Trait` object pointed-to by the pointer is _opaque_ to code working
with it, and different tait objects with the same trait object type may
with it, and different trait objects with the same trait object type may
have different sizes.

2. The pointer used to access a trait object is paired with an extra pointer
Expand Down Expand Up @@ -167,7 +167,7 @@ implementation on-demand. If you call `foo()` with a `bool` parameter, the
compiler will only generate code for `foo::<bool>()`. When we have additional
type parameters, the number of monomorphized implementations the compiler
generates does not grow drastically, since the compiler will only generate an
implementation if the function is called with unparametrized substitutions
implementation if the function is called with unparameterized substitutions
(i.e., substitutions where none of the substituted types are themselves
parameterized).

Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_error_codes/src/error_codes/E0183.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Manual implemetation of a `Fn*` trait.
Manual implementation of a `Fn*` trait.

Erroneous code example:

Expand Down Expand Up @@ -33,7 +33,7 @@ impl FnOnce<()> for MyClosure { // ok!
}
```

The argumements must be a tuple representing the argument list.
The arguments must be a tuple representing the argument list.
For more info, see the [tracking issue][iss29625]:

[iss29625]: https://github.com/rust-lang/rust/issues/29625
2 changes: 1 addition & 1 deletion compiler/rustc_error_codes/src/error_codes/E0521.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let _add = |el: &str| {
};
```

A type anotation of a closure parameter implies a new lifetime declaration.
A type annotation of a closure parameter implies a new lifetime declaration.
Consider to drop it, the compiler is reliably able to infer them.

```
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_error_codes/src/error_codes/E0581.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn main() {
}
```

The problem here is that the lifetime isn't contrained by any of the arguments,
The problem here is that the lifetime isn't constrained by any of the arguments,
making it impossible to determine how long it's supposed to live.

To fix this issue, either use the lifetime in the arguments, or use the
Expand Down

0 comments on commit 842bf71

Please sign in to comment.