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

Correct minor typos in some long error code explanations #92752

Merged
merged 1 commit into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
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