1 error[E0106]: missing lifetime specifier
2 --> $DIR/missing-lt-for-hrtb.rs:2:32
4 LL | struct S<'a>(&'a dyn Fn(&X) -> &X);
5 | -- ^ expected named lifetime parameter
7 = help: this function's return type contains a borrowed value, but the signature does not say which one of argument 1's 2 lifetimes it is borrowed from
8 = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
9 help: consider making the bound lifetime-generic with a new `'b` lifetime
11 LL | struct S<'a>(&'a dyn for<'b> Fn(&'b X) -> &'b X);
13 help: consider using the `'a` lifetime
15 LL | struct S<'a>(&'a dyn Fn(&X) -> &'a X);
18 error[E0106]: missing lifetime specifier
19 --> $DIR/missing-lt-for-hrtb.rs:2:33
21 LL | struct S<'a>(&'a dyn Fn(&X) -> &X);
22 | -- ^ expected named lifetime parameter
24 = help: this function's return type contains a borrowed value, but the signature does not say which one of argument 1's 2 lifetimes it is borrowed from
25 = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
26 help: consider making the bound lifetime-generic with a new `'b` lifetime
28 LL | struct S<'a>(&'a dyn for<'b> Fn(&'b X) -> &X<'b>);
30 help: consider using the `'a` lifetime
32 LL | struct S<'a>(&'a dyn Fn(&X) -> &X<'a>);
35 error[E0106]: missing lifetime specifier
36 --> $DIR/missing-lt-for-hrtb.rs:5:40
38 LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &X);
39 | -- ^ expected named lifetime parameter
41 = help: this function's return type contains a borrowed value, but the signature does not say which one of argument 1's 2 lifetimes it is borrowed from
42 note: these named lifetimes are available to use
43 --> $DIR/missing-lt-for-hrtb.rs:5:10
45 LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &X);
47 help: consider using one of the available lifetimes here
49 LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &'lifetime X);
52 error[E0106]: missing lifetime specifier
53 --> $DIR/missing-lt-for-hrtb.rs:5:41
55 LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &X);
56 | -- ^ expected named lifetime parameter
58 = help: this function's return type contains a borrowed value, but the signature does not say which one of argument 1's 2 lifetimes it is borrowed from
59 note: these named lifetimes are available to use
60 --> $DIR/missing-lt-for-hrtb.rs:5:10
62 LL | struct V<'a>(&'a dyn for<'b> Fn(&X) -> &X);
65 error: aborting due to 4 previous errors
67 For more information about this error, try `rustc --explain E0106`.