|
| 1 | +error[E0261]: use of undeclared lifetime name `'fn` |
| 2 | + --> $DIR/error-lifetime-name-issue-143150.rs:2:21 |
| 3 | + | |
| 4 | +LL | fn a(_: dyn Trait + 'r#fn) { |
| 5 | + | - ^^^^^ undeclared lifetime |
| 6 | + | | |
| 7 | + | help: consider introducing lifetime `'fn` here: `<'fn>` |
| 8 | + |
| 9 | +error[E0261]: use of undeclared lifetime name `'fn` |
| 10 | + --> $DIR/error-lifetime-name-issue-143150.rs:10:9 |
| 11 | + | |
| 12 | +LL | struct Test { |
| 13 | + | - help: consider introducing lifetime `'fn` here: `<'fn>` |
| 14 | +LL | a: &'r#fn str, |
| 15 | + | ^^^^^ undeclared lifetime |
| 16 | + |
| 17 | +error[E0261]: use of undeclared lifetime name `'fn` |
| 18 | + --> $DIR/error-lifetime-name-issue-143150.rs:10:9 |
| 19 | + | |
| 20 | +LL | #[derive(Eq, PartialEq)] |
| 21 | + | -- lifetime `'fn` is missing in item created through this procedural macro |
| 22 | +LL | struct Test { |
| 23 | + | - help: consider introducing lifetime `'fn` here: `<'fn>` |
| 24 | +LL | a: &'r#fn str, |
| 25 | + | ^^^^^ undeclared lifetime |
| 26 | + |
| 27 | +error[E0261]: use of undeclared lifetime name `'fn` |
| 28 | + --> $DIR/error-lifetime-name-issue-143150.rs:16:32 |
| 29 | + | |
| 30 | +LL | where T: for<'a> Trait1<T> + 'r#fn { } |
| 31 | + | ^^^^^ undeclared lifetime |
| 32 | + | |
| 33 | + = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html |
| 34 | +help: consider making the bound lifetime-generic with a new `'fn` lifetime |
| 35 | + | |
| 36 | +LL - where T: for<'a> Trait1<T> + 'r#fn { } |
| 37 | +LL + where for<'fn, 'a> T: Trait1<T> + 'r#fn { } |
| 38 | + | |
| 39 | +help: consider introducing lifetime `'fn` here |
| 40 | + | |
| 41 | +LL | trait Trait1<'fn, T> |
| 42 | + | ++++ |
| 43 | + |
| 44 | +error: aborting due to 4 previous errors |
| 45 | + |
| 46 | +For more information about this error, try `rustc --explain E0261`. |
0 commit comments