fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.5 KiB82 linesraw
1error[E0261]: use of undeclared lifetime name `'b`
2  --> $DIR/nested-rpit-hrtb.rs:54:77
3   |
4LL | fn two_htrb_outlives() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Sized + 'b> {}
5   |                                                                             ^^ undeclared lifetime
6   |
7   = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
8help: consider making the bound lifetime-generic with a new `'b` lifetime
9   |
10LL | fn two_htrb_outlives() -> impl for<'b, 'a> Foo<'a, Assoc = impl for<'b> Sized + 'b> {}
11   |                                    +++
12help: consider introducing lifetime `'b` here
13   |
14LL | fn two_htrb_outlives<'b>() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Sized + 'b> {}
15   |                     ++++
16
17error[E0261]: use of undeclared lifetime name `'b`
18  --> $DIR/nested-rpit-hrtb.rs:61:82
19   |
20LL | fn two_htrb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {}
21   |                                                                                  ^^ undeclared lifetime
22   |
23help: consider making the bound lifetime-generic with a new `'b` lifetime
24   |
25LL | fn two_htrb_outlives_uses() -> impl for<'b, 'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {}
26   |                                         +++
27help: consider introducing lifetime `'b` here
28   |
29LL | fn two_htrb_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {}
30   |                          ++++
31
32error: higher kinded lifetime bounds on nested opaque types are not supported yet
33  --> $DIR/nested-rpit-hrtb.rs:25:69
34   |
35LL | fn one_hrtb_outlives() -> impl for<'a> Foo<'a, Assoc = impl Sized + 'a> {}
36   |                                                                     ^^
37   |
38note: lifetime declared here
39  --> $DIR/nested-rpit-hrtb.rs:25:36
40   |
41LL | fn one_hrtb_outlives() -> impl for<'a> Foo<'a, Assoc = impl Sized + 'a> {}
42   |                                    ^^
43
44error: higher kinded lifetime bounds on nested opaque types are not supported yet
45  --> $DIR/nested-rpit-hrtb.rs:29:68
46   |
47LL | fn one_hrtb_trait_param() -> impl for<'a> Foo<'a, Assoc = impl Qux<'a>> {}
48   |                                                                    ^^
49   |
50note: lifetime declared here
51  --> $DIR/nested-rpit-hrtb.rs:29:39
52   |
53LL | fn one_hrtb_trait_param() -> impl for<'a> Foo<'a, Assoc = impl Qux<'a>> {}
54   |                                       ^^
55
56error: higher kinded lifetime bounds on nested opaque types are not supported yet
57  --> $DIR/nested-rpit-hrtb.rs:32:74
58   |
59LL | fn one_hrtb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'a> {}
60   |                                                                          ^^
61   |
62note: lifetime declared here
63  --> $DIR/nested-rpit-hrtb.rs:32:41
64   |
65LL | fn one_hrtb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'a> {}
66   |                                         ^^
67
68error: higher kinded lifetime bounds on nested opaque types are not supported yet
69  --> $DIR/nested-rpit-hrtb.rs:35:73
70   |
71LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {}
72   |                                                                         ^^
73   |
74note: lifetime declared here
75  --> $DIR/nested-rpit-hrtb.rs:35:44
76   |
77LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {}
78   |                                            ^^
79
80error: aborting due to 6 previous errors
81
82For more information about this error, try `rustc --explain E0261`.