6ba08755df
This doesn't mention that using an existing lifetime is possible, but that would hopefully be clear as always being an option. The intention of this is to teach newcomers what the lifetime syntax is.
28 lines
992 B
Plaintext
28 lines
992 B
Plaintext
error[E0261]: use of undeclared lifetime name `'a`
|
|
--> $DIR/where-lifetime-resolution.rs:6:38
|
|
|
|
|
LL | fn f() where
|
|
| - help: consider introducing lifetime `'a` here: `<'a>`
|
|
LL | for<'a> dyn Trait1<'a>: Trait1<'a>, // OK
|
|
LL | (dyn for<'a> Trait1<'a>): Trait1<'a>,
|
|
| ^^ undeclared lifetime
|
|
|
|
error[E0316]: nested quantification of lifetimes
|
|
--> $DIR/where-lifetime-resolution.rs:8:17
|
|
|
|
|
LL | for<'a> dyn for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error[E0261]: use of undeclared lifetime name `'b`
|
|
--> $DIR/where-lifetime-resolution.rs:8:52
|
|
|
|
|
LL | fn f() where
|
|
| - help: consider introducing lifetime `'b` here: `<'b>`
|
|
...
|
|
LL | for<'a> dyn for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
|
|
| ^^ undeclared lifetime
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0261`.
|