|
| 1 | +error[E0261]: use of undeclared lifetime name `'db` |
| 2 | + --> $DIR/nested-impl-trait-in-tait.rs:3:40 |
| 3 | + | |
| 4 | +LL | pub type Tait = impl Iterator<Item = (&'db Key, impl Iterator)>; |
| 5 | + | ^^^ undeclared lifetime |
| 6 | + | |
| 7 | + = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html |
| 8 | +help: consider making the bound lifetime-generic with a new `'db` lifetime |
| 9 | + | |
| 10 | +LL | pub type Tait = impl for<'db> Iterator<Item = (&'db Key, impl Iterator)>; |
| 11 | + | ++++++++ |
| 12 | +help: consider introducing lifetime `'db` here |
| 13 | + | |
| 14 | +LL | pub type Tait<'db> = impl Iterator<Item = (&'db Key, impl Iterator)>; |
| 15 | + | +++++ |
| 16 | + |
| 17 | +error[E0412]: cannot find type `Key` in this scope |
| 18 | + --> $DIR/nested-impl-trait-in-tait.rs:3:44 |
| 19 | + | |
| 20 | +LL | pub type Tait = impl Iterator<Item = (&'db Key, impl Iterator)>; |
| 21 | + | ^^^ not found in this scope |
| 22 | + | |
| 23 | +help: consider importing this struct |
| 24 | + | |
| 25 | +LL + use std::thread::local_impl::Key; |
| 26 | + | |
| 27 | + |
| 28 | +error: unconstrained opaque type |
| 29 | + --> $DIR/nested-impl-trait-in-tait.rs:3:17 |
| 30 | + | |
| 31 | +LL | pub type Tait = impl Iterator<Item = (&'db Key, impl Iterator)>; |
| 32 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 33 | + | |
| 34 | + = note: `Tait` must be used in combination with a concrete type within the same module |
| 35 | + |
| 36 | +error: unconstrained opaque type |
| 37 | + --> $DIR/nested-impl-trait-in-tait.rs:3:49 |
| 38 | + | |
| 39 | +LL | pub type Tait = impl Iterator<Item = (&'db Key, impl Iterator)>; |
| 40 | + | ^^^^^^^^^^^^^ |
| 41 | + | |
| 42 | + = note: `Tait` must be used in combination with a concrete type within the same module |
| 43 | + |
| 44 | +error: aborting due to 4 previous errors |
| 45 | + |
| 46 | +Some errors have detailed explanations: E0261, E0412. |
| 47 | +For more information about an error, try `rustc --explain E0261`. |
0 commit comments