1
1
error[E0261]: use of undeclared lifetime name `'b`
2
- --> $DIR/nested-rpit-hrtb.rs:56 :77
2
+ --> $DIR/nested-rpit-hrtb.rs:57 :77
3
3
|
4
4
LL | fn two_htrb_outlives() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Sized + 'b> {}
5
5
| ^^ undeclared lifetime
@@ -15,7 +15,7 @@ LL | fn two_htrb_outlives<'b>() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Siz
15
15
| ++++
16
16
17
17
error[E0261]: use of undeclared lifetime name `'b`
18
- --> $DIR/nested-rpit-hrtb.rs:64 :82
18
+ --> $DIR/nested-rpit-hrtb.rs:65 :82
19
19
|
20
20
LL | fn two_htrb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {}
21
21
| ^^ undeclared lifetime
@@ -65,29 +65,39 @@ note: lifetime declared here
65
65
LL | fn one_hrtb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'a> {}
66
66
| ^^
67
67
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
+
68
77
error[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
70
79
|
71
80
LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {}
72
81
| ^^
73
82
|
74
83
note: lifetime declared here
75
- --> $DIR/nested-rpit-hrtb.rs:35 :44
84
+ --> $DIR/nested-rpit-hrtb.rs:36 :44
76
85
|
77
86
LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {}
78
87
| ^^
79
88
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
82
91
|
83
92
LL | 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
+ | ^^^^^^^^^^^^
85
94
|
95
+ = note: cannot satisfy `for<'a> &'a (): Qux<'b>`
86
96
= help: the trait `Qux<'_>` is implemented for `()`
87
97
= help: for that trait implementation, expected `()`, found `&'a ()`
88
98
89
99
error: implementation of `Bar` is not general enough
90
- --> $DIR/nested-rpit-hrtb.rs:49 :93
100
+ --> $DIR/nested-rpit-hrtb.rs:50 :93
91
101
|
92
102
LL | fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'b> {}
93
103
| ^^ 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 =
96
106
= note: ...but it actually implements `Bar<'0>`, for some specific lifetime `'0`
97
107
98
108
error[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
100
110
|
101
111
LL | fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Qux<'b>> {}
102
112
| ^^^^^^^^^^^^^^^^^^^^ 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>
105
115
= help: for that trait implementation, expected `()`, found `&'a ()`
106
116
107
117
error: implementation of `Bar` is not general enough
108
- --> $DIR/nested-rpit-hrtb.rs:64 :86
118
+ --> $DIR/nested-rpit-hrtb.rs:65 :86
109
119
|
110
120
LL | fn two_htrb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {}
111
121
| ^^ implementation of `Bar` is not general enough
112
122
|
113
123
= note: `()` must implement `Bar<'a>`
114
124
= note: ...but it actually implements `Bar<'0>`, for some specific lifetime `'0`
115
125
116
- error: aborting due to 10 previous errors
126
+ error: aborting due to 11 previous errors
117
127
118
- Some errors have detailed explanations: E0261, E0277, E0657.
128
+ Some errors have detailed explanations: E0261, E0277, E0283, E0657.
119
129
For more information about an error, try `rustc --explain E0261`.
0 commit comments