rust/src/test/ui/underscore-lifetime/dyn-trait-underscore-in-struct.stderr

22 lines
671 B
Plaintext
Raw Normal View History

error[E0106]: missing lifetime specifier
2018-12-25 08:56:47 -07:00
--> $DIR/dyn-trait-underscore-in-struct.rs:9:24
|
2019-03-09 15:03:44 +03:00
LL | x: Box<dyn Debug + '_>,
| ^^ expected named lifetime parameter
|
help: consider introducing a named lifetime
|
LL | struct Foo<'lifetime> {
LL | x: Box<dyn Debug + 'lifetime>,
|
error[E0228]: the lifetime bound for this object type cannot be deduced from context; please supply an explicit bound
2018-12-25 08:56:47 -07:00
--> $DIR/dyn-trait-underscore-in-struct.rs:9:12
|
2019-03-09 15:03:44 +03:00
LL | x: Box<dyn Debug + '_>,
| ^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0106`.