]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/impl-fn-hrtb-bounds.stderr
Rollup merge of #84022 - Aaron1011:remove-derive-res-fallback, r=petrochenkov
[rust.git] / src / test / ui / impl-trait / impl-fn-hrtb-bounds.stderr
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
13 error: higher kinded lifetime bounds on nested opaque types are not supported yet
14   --> $DIR/impl-fn-hrtb-bounds.rs:4:41
15    |
16 LL | fn a() -> impl Fn(&u8) -> (impl Debug + '_) {
17    |                                         ^^
18    |
19 note: lifetime declared here
20   --> $DIR/impl-fn-hrtb-bounds.rs:4:19
21    |
22 LL | fn a() -> impl Fn(&u8) -> (impl Debug + '_) {
23    |                   ^
24
25 error: higher kinded lifetime bounds on nested opaque types are not supported yet
26   --> $DIR/impl-fn-hrtb-bounds.rs:9:52
27    |
28 LL | fn b() -> impl for<'a> Fn(&'a u8) -> (impl Debug + 'a) {
29    |                                                    ^^
30    |
31 note: lifetime declared here
32   --> $DIR/impl-fn-hrtb-bounds.rs:9:20
33    |
34 LL | fn b() -> impl for<'a> Fn(&'a u8) -> (impl Debug + 'a) {
35    |                    ^^
36
37 error: higher kinded lifetime bounds on nested opaque types are not supported yet
38   --> $DIR/impl-fn-hrtb-bounds.rs:14:52
39    |
40 LL | fn c() -> impl for<'a> Fn(&'a u8) -> (impl Debug + '_) {
41    |                                                    ^^
42    |
43 note: lifetime declared here
44   --> $DIR/impl-fn-hrtb-bounds.rs:14:20
45    |
46 LL | fn c() -> impl for<'a> Fn(&'a u8) -> (impl Debug + '_) {
47    |                    ^^
48
49 error: aborting due to 4 previous errors
50
51 For more information about this error, try `rustc --explain E0106`.