| 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`. |