mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 16:57:03 +00:00
20 lines
705 B
Plaintext
20 lines
705 B
Plaintext
error[E0261]: use of undeclared lifetime name `'a`
|
|
--> $DIR/box-pattern-type-mismatch.rs:7:31
|
|
|
|
|
LL | struct X(dyn Iterator<Item = &'a ()>);
|
|
| ^^ undeclared lifetime
|
|
|
|
|
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
|
|
help: consider making the bound lifetime-generic with a new `'a` lifetime
|
|
|
|
|
LL | struct X(dyn for<'a> Iterator<Item = &'a ()>);
|
|
| +++++++
|
|
help: consider introducing lifetime `'a` here
|
|
|
|
|
LL | struct X<'a>(dyn Iterator<Item = &'a ()>);
|
|
| ++++
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0261`.
|