|
| 1 | +error[E0106]: missing lifetime specifier |
| 2 | + --> $DIR/impl-fn-hrtb-bounds.rs:19:38 |
| 3 | + | |
| 4 | +LL | fn d() -> impl Fn() -> (impl Debug + '_) { |
| 5 | + | ^^ expected named lifetime parameter |
| 6 | + | |
| 7 | + = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from |
| 8 | +help: consider using the `'static` lifetime |
| 9 | + | |
| 10 | +LL | fn d() -> impl Fn() -> (impl Debug + 'static) { |
| 11 | + | ~~~~~~~ |
| 12 | + |
1 | 13 | error: higher kinded lifetime bounds on nested opaque types are not supported yet |
2 | | - --> $DIR/impl-fn-hrtb-bounds.rs:3:41 |
| 14 | + --> $DIR/impl-fn-hrtb-bounds.rs:4:41 |
3 | 15 | | |
4 | 16 | LL | fn a() -> impl Fn(&u8) -> (impl Debug + '_) { |
5 | 17 | | ^^ |
6 | 18 | | |
7 | 19 | note: lifetime declared here |
8 | | - --> $DIR/impl-fn-hrtb-bounds.rs:3:19 |
| 20 | + --> $DIR/impl-fn-hrtb-bounds.rs:4:19 |
9 | 21 | | |
10 | 22 | LL | fn a() -> impl Fn(&u8) -> (impl Debug + '_) { |
11 | 23 | | ^ |
12 | 24 |
|
13 | 25 | error: higher kinded lifetime bounds on nested opaque types are not supported yet |
14 | | - --> $DIR/impl-fn-hrtb-bounds.rs:8:52 |
| 26 | + --> $DIR/impl-fn-hrtb-bounds.rs:9:52 |
15 | 27 | | |
16 | 28 | LL | fn b() -> impl for<'a> Fn(&'a u8) -> (impl Debug + 'a) { |
17 | 29 | | ^^ |
18 | 30 | | |
19 | 31 | note: lifetime declared here |
20 | | - --> $DIR/impl-fn-hrtb-bounds.rs:8:20 |
| 32 | + --> $DIR/impl-fn-hrtb-bounds.rs:9:20 |
21 | 33 | | |
22 | 34 | LL | fn b() -> impl for<'a> Fn(&'a u8) -> (impl Debug + 'a) { |
23 | 35 | | ^^ |
24 | 36 |
|
25 | 37 | error: higher kinded lifetime bounds on nested opaque types are not supported yet |
26 | | - --> $DIR/impl-fn-hrtb-bounds.rs:13:52 |
| 38 | + --> $DIR/impl-fn-hrtb-bounds.rs:14:52 |
27 | 39 | | |
28 | 40 | LL | fn c() -> impl for<'a> Fn(&'a u8) -> (impl Debug + '_) { |
29 | 41 | | ^^ |
30 | 42 | | |
31 | 43 | note: lifetime declared here |
32 | | - --> $DIR/impl-fn-hrtb-bounds.rs:13:20 |
| 44 | + --> $DIR/impl-fn-hrtb-bounds.rs:14:20 |
33 | 45 | | |
34 | 46 | LL | fn c() -> impl for<'a> Fn(&'a u8) -> (impl Debug + '_) { |
35 | 47 | | ^^ |
36 | 48 |
|
37 | | -error[E0106]: missing lifetime specifier |
38 | | - --> $DIR/impl-fn-hrtb-bounds.rs:18:38 |
39 | | - | |
40 | | -LL | fn d() -> impl Fn() -> (impl Debug + '_) { |
41 | | - | ^^ expected named lifetime parameter |
42 | | - | |
43 | | - = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from |
44 | | - = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html |
45 | | -help: consider making the bound lifetime-generic with a new `'a` lifetime |
46 | | - | |
47 | | -LL | fn d() -> impl for<'a> Fn() -> (impl Debug + 'a) { |
48 | | - | +++++++ ~~ |
49 | | -help: consider using the `'static` lifetime |
50 | | - | |
51 | | -LL | fn d() -> impl Fn() -> (impl Debug + 'static) { |
52 | | - | ~~~~~~~ |
53 | | - |
54 | 49 | error: aborting due to 4 previous errors |
55 | 50 |
|
56 | 51 | For more information about this error, try `rustc --explain E0106`. |
0 commit comments