Correct long error message according to reviews
This commit is contained in:
parent
8f7eb6229c
commit
32103b127f
@ -1,8 +1,8 @@
|
||||
Only a single explicit lifetime bound is permitted on trait objects.
|
||||
More than one explicit lifetime bound was used on a trait object.
|
||||
|
||||
Example of erroneous code:
|
||||
|
||||
```compile_fail
|
||||
```compile_fail,E0226
|
||||
trait Foo {}
|
||||
|
||||
type T<'a, 'b> = dyn Foo + 'a + 'b; // error: Trait object `arg` has two
|
||||
@ -11,6 +11,7 @@ type T<'a, 'b> = dyn Foo + 'a + 'b; // error: Trait object `arg` has two
|
||||
|
||||
Here `T` is a trait object with two explicit lifetime bounds, 'a and 'b.
|
||||
|
||||
Only a single explicit lifetime bound is permitted on trait objects.
|
||||
To fix this error, consider removing one of the lifetime bounds:
|
||||
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user