Skip to content

Commit 842bf71

Browse files
committed
fix(compiler): correct minor typos in some long error code explanations
1 parent 89b9f7b commit 842bf71

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

compiler/rustc_error_codes/src/error_codes/E0038.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Two general aspects of trait object types give rise to the restrictions:
1515
these types can only be accessed through pointers, such as `&dyn Trait` or
1616
`Box<dyn Trait>`. The size of such a pointer is known, but the size of the
1717
`dyn Trait` object pointed-to by the pointer is _opaque_ to code working
18-
with it, and different tait objects with the same trait object type may
18+
with it, and different trait objects with the same trait object type may
1919
have different sizes.
2020

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

compiler/rustc_error_codes/src/error_codes/E0183.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Manual implemetation of a `Fn*` trait.
1+
Manual implementation of a `Fn*` trait.
22

33
Erroneous code example:
44

@@ -33,7 +33,7 @@ impl FnOnce<()> for MyClosure { // ok!
3333
}
3434
```
3535

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

3939
[iss29625]: https://github.com/rust-lang/rust/issues/29625

compiler/rustc_error_codes/src/error_codes/E0521.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ let _add = |el: &str| {
1010
};
1111
```
1212

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

1616
```

compiler/rustc_error_codes/src/error_codes/E0581.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn main() {
1010
}
1111
```
1212

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

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

0 commit comments

Comments
 (0)