11error[E0261]: use of undeclared lifetime name `'b`
2- --> $DIR/nested-rpit-hrtb.rs:56 :77
2+ --> $DIR/nested-rpit-hrtb.rs:57 :77
33 |
44LL | fn two_htrb_outlives() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Sized + 'b> {}
55 | ^^ undeclared lifetime
@@ -15,7 +15,7 @@ LL | fn two_htrb_outlives<'b>() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Siz
1515 | ++++
1616
1717error[E0261]: use of undeclared lifetime name `'b`
18- --> $DIR/nested-rpit-hrtb.rs:64 :82
18+ --> $DIR/nested-rpit-hrtb.rs:65 :82
1919 |
2020LL | fn two_htrb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {}
2121 | ^^ undeclared lifetime
@@ -65,29 +65,39 @@ note: lifetime declared here
6565LL | fn one_hrtb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'a> {}
6666 | ^^
6767
68+ error: implementation of `Bar` is not general enough
69+ --> $DIR/nested-rpit-hrtb.rs:32:78
70+ |
71+ LL | fn one_hrtb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'a> {}
72+ | ^^ implementation of `Bar` is not general enough
73+ |
74+ = note: `()` must implement `Bar<'a>`
75+ = note: ...but it actually implements `Bar<'0>`, for some specific lifetime `'0`
76+
6877error[E0657]: `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
69- --> $DIR/nested-rpit-hrtb.rs:35 :73
78+ --> $DIR/nested-rpit-hrtb.rs:36 :73
7079 |
7180LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {}
7281 | ^^
7382 |
7483note: lifetime declared here
75- --> $DIR/nested-rpit-hrtb.rs:35 :44
84+ --> $DIR/nested-rpit-hrtb.rs:36 :44
7685 |
7786LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {}
7887 | ^^
7988
80- error[E0277 ]: the trait bound `for<'a> &'a (): Qux<'b>` is not satisfied
81- --> $DIR/nested-rpit-hrtb.rs:45 :79
89+ error[E0283 ]: type annotations needed: cannot satisfy `for<'a> &'a (): Qux<'b>`
90+ --> $DIR/nested-rpit-hrtb.rs:46 :79
8291 |
8392LL | fn one_hrtb_mention_fn_trait_param_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Qux<'b>> {}
84- | ^^^^^^^^^^^^ the trait `for<'a> Qux<'b>` is not implemented for `&'a ()`
93+ | ^^^^^^^^^^^^
8594 |
95+ = note: cannot satisfy `for<'a> &'a (): Qux<'b>`
8696 = help: the trait `Qux<'_>` is implemented for `()`
8797 = help: for that trait implementation, expected `()`, found `&'a ()`
8898
8999error: implementation of `Bar` is not general enough
90- --> $DIR/nested-rpit-hrtb.rs:49 :93
100+ --> $DIR/nested-rpit-hrtb.rs:50 :93
91101 |
92102LL | fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'b> {}
93103 | ^^ implementation of `Bar` is not general enough
@@ -96,7 +106,7 @@ LL | fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc =
96106 = note: ...but it actually implements `Bar<'0>`, for some specific lifetime `'0`
97107
98108error[E0277]: the trait bound `for<'a, 'b> &'a (): Qux<'b>` is not satisfied
99- --> $DIR/nested-rpit-hrtb.rs:60 :64
109+ --> $DIR/nested-rpit-hrtb.rs:61 :64
100110 |
101111LL | fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Qux<'b>> {}
102112 | ^^^^^^^^^^^^^^^^^^^^ the trait `for<'a, 'b> Qux<'b>` is not implemented for `&'a ()`
@@ -105,15 +115,15 @@ LL | fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b>
105115 = help: for that trait implementation, expected `()`, found `&'a ()`
106116
107117error: implementation of `Bar` is not general enough
108- --> $DIR/nested-rpit-hrtb.rs:64 :86
118+ --> $DIR/nested-rpit-hrtb.rs:65 :86
109119 |
110120LL | fn two_htrb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {}
111121 | ^^ implementation of `Bar` is not general enough
112122 |
113123 = note: `()` must implement `Bar<'a>`
114124 = note: ...but it actually implements `Bar<'0>`, for some specific lifetime `'0`
115125
116- error: aborting due to 10 previous errors
126+ error: aborting due to 11 previous errors
117127
118- Some errors have detailed explanations: E0261, E0277, E0657.
128+ Some errors have detailed explanations: E0261, E0277, E0283, E0657.
119129For more information about an error, try `rustc --explain E0261`.
0 commit comments