rust/tests/ui/structs/default-field-values/do-not-ice-on-invalid-lifet...

24 lines
731 B
Plaintext

error[E0106]: missing lifetime specifier
--> $DIR/do-not-ice-on-invalid-lifetime.rs:3:12
|
LL | x: Vec<A> = Vec::new(),
| ^ expected named lifetime parameter
|
help: consider using the `'a` lifetime
|
LL | x: Vec<A<'a>> = Vec::new(),
| ++++
error[E0392]: lifetime parameter `'a` is never used
--> $DIR/do-not-ice-on-invalid-lifetime.rs:2:10
|
LL | struct A<'a> {
| ^^ unused lifetime parameter
|
= help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0106, E0392.
For more information about an error, try `rustc --explain E0106`.