Skip to content

Commit 32103b1

Browse files
committed
Correct long error message according to reviews
1 parent 8f7eb62 commit 32103b1

File tree

1 file changed

+3
-2
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+3
-2
lines changed

src/librustc_error_codes/error_codes/E0226.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Only a single explicit lifetime bound is permitted on trait objects.
1+
More than one explicit lifetime bound was used on a trait object.
22

33
Example of erroneous code:
44

5-
```compile_fail
5+
```compile_fail,E0226
66
trait Foo {}
77
88
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
1111

1212
Here `T` is a trait object with two explicit lifetime bounds, 'a and 'b.
1313

14+
Only a single explicit lifetime bound is permitted on trait objects.
1415
To fix this error, consider removing one of the lifetime bounds:
1516

1617
```

0 commit comments

Comments
 (0)