fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
6.2 KiB209 linesraw
1error[E0261]: use of undeclared lifetime name `'x`
2  --> $DIR/feature-gate-in_band_lifetimes.rs:3:12
3   |
4LL | fn foo(x: &'x u8) -> &'x u8 { x }
5   |       -    ^^ undeclared lifetime
6   |       |
7   |       help: consider introducing lifetime `'x` here: `<'x>`
8
9error[E0261]: use of undeclared lifetime name `'x`
10  --> $DIR/feature-gate-in_band_lifetimes.rs:3:23
11   |
12LL | fn foo(x: &'x u8) -> &'x u8 { x }
13   |       -               ^^ undeclared lifetime
14   |       |
15   |       help: consider introducing lifetime `'x` here: `<'x>`
16
17error[E0261]: use of undeclared lifetime name `'b`
18  --> $DIR/feature-gate-in_band_lifetimes.rs:15:12
19   |
20LL | impl<'a> X<'b> {
21   |      -     ^^ undeclared lifetime
22   |      |
23   |      help: consider introducing lifetime `'b` here: `'b,`
24
25error[E0261]: use of undeclared lifetime name `'b`
26  --> $DIR/feature-gate-in_band_lifetimes.rs:17:27
27   |
28LL |     fn inner_2(&self) -> &'b u8 {
29   |                           ^^ undeclared lifetime
30   |
31help: consider introducing lifetime `'b` here
32   |
33LL | impl<'b, 'a> X<'b> {
34   |      ^^^
35help: consider introducing lifetime `'b` here
36   |
37LL |     fn inner_2<'b>(&self) -> &'b u8 {
38   |               ^^^^
39
40error[E0261]: use of undeclared lifetime name `'b`
41  --> $DIR/feature-gate-in_band_lifetimes.rs:23:8
42   |
43LL | impl X<'b> {
44   |     -  ^^ undeclared lifetime
45   |     |
46   |     help: consider introducing lifetime `'b` here: `<'b>`
47
48error[E0261]: use of undeclared lifetime name `'b`
49  --> $DIR/feature-gate-in_band_lifetimes.rs:25:27
50   |
51LL |     fn inner_3(&self) -> &'b u8 {
52   |                           ^^ undeclared lifetime
53   |
54help: consider introducing lifetime `'b` here
55   |
56LL | impl<'b> X<'b> {
57   |     ^^^^
58help: consider introducing lifetime `'b` here
59   |
60LL |     fn inner_3<'b>(&self) -> &'b u8 {
61   |               ^^^^
62
63error[E0261]: use of undeclared lifetime name `'a`
64  --> $DIR/feature-gate-in_band_lifetimes.rs:33:9
65   |
66LL | impl Y<&'a u8> {
67   |     -   ^^ undeclared lifetime
68   |     |
69   |     help: consider introducing lifetime `'a` here: `<'a>`
70
71error[E0261]: use of undeclared lifetime name `'a`
72  --> $DIR/feature-gate-in_band_lifetimes.rs:35:25
73   |
74LL |     fn inner(&self) -> &'a u8 {
75   |                         ^^ undeclared lifetime
76   |
77help: consider introducing lifetime `'a` here
78   |
79LL | impl<'a> Y<&'a u8> {
80   |     ^^^^
81help: consider introducing lifetime `'a` here
82   |
83LL |     fn inner<'a>(&self) -> &'a u8 {
84   |             ^^^^
85
86error[E0261]: use of undeclared lifetime name `'b`
87  --> $DIR/feature-gate-in_band_lifetimes.rs:43:27
88   |
89LL |     fn any_lifetime() -> &'b u8;
90   |                           ^^ undeclared lifetime
91   |
92help: consider introducing lifetime `'b` here
93   |
94LL | trait MyTrait<'b, 'a> {
95   |               ^^^
96help: consider introducing lifetime `'b` here
97   |
98LL |     fn any_lifetime<'b>() -> &'b u8;
99   |                    ^^^^
100
101error[E0261]: use of undeclared lifetime name `'b`
102  --> $DIR/feature-gate-in_band_lifetimes.rs:45:27
103   |
104LL |     fn borrowed_lifetime(&'b self) -> &'b u8;
105   |                           ^^ undeclared lifetime
106   |
107help: consider introducing lifetime `'b` here
108   |
109LL | trait MyTrait<'b, 'a> {
110   |               ^^^
111help: consider introducing lifetime `'b` here
112   |
113LL |     fn borrowed_lifetime<'b>(&'b self) -> &'b u8;
114   |                         ^^^^
115
116error[E0261]: use of undeclared lifetime name `'b`
117  --> $DIR/feature-gate-in_band_lifetimes.rs:45:40
118   |
119LL |     fn borrowed_lifetime(&'b self) -> &'b u8;
120   |                                        ^^ undeclared lifetime
121   |
122help: consider introducing lifetime `'b` here
123   |
124LL | trait MyTrait<'b, 'a> {
125   |               ^^^
126help: consider introducing lifetime `'b` here
127   |
128LL |     fn borrowed_lifetime<'b>(&'b self) -> &'b u8;
129   |                         ^^^^
130
131error[E0261]: use of undeclared lifetime name `'a`
132  --> $DIR/feature-gate-in_band_lifetimes.rs:50:14
133   |
134LL | impl MyTrait<'a> for Y<&'a u8> {
135   |     -        ^^ undeclared lifetime
136   |     |
137   |     help: consider introducing lifetime `'a` here: `<'a>`
138
139error[E0261]: use of undeclared lifetime name `'a`
140  --> $DIR/feature-gate-in_band_lifetimes.rs:50:25
141   |
142LL | impl MyTrait<'a> for Y<&'a u8> {
143   |     -                   ^^ undeclared lifetime
144   |     |
145   |     help: consider introducing lifetime `'a` here: `<'a>`
146
147error[E0261]: use of undeclared lifetime name `'a`
148  --> $DIR/feature-gate-in_band_lifetimes.rs:53:31
149   |
150LL |     fn my_lifetime(&self) -> &'a u8 { self.0 }
151   |                               ^^ undeclared lifetime
152   |
153help: consider introducing lifetime `'a` here
154   |
155LL | impl<'a> MyTrait<'a> for Y<&'a u8> {
156   |     ^^^^
157help: consider introducing lifetime `'a` here
158   |
159LL |     fn my_lifetime<'a>(&self) -> &'a u8 { self.0 }
160   |                   ^^^^
161
162error[E0261]: use of undeclared lifetime name `'b`
163  --> $DIR/feature-gate-in_band_lifetimes.rs:55:27
164   |
165LL |     fn any_lifetime() -> &'b u8 { &0 }
166   |                           ^^ undeclared lifetime
167   |
168help: consider introducing lifetime `'b` here
169   |
170LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
171   |     ^^^^
172help: consider introducing lifetime `'b` here
173   |
174LL |     fn any_lifetime<'b>() -> &'b u8 { &0 }
175   |                    ^^^^
176
177error[E0261]: use of undeclared lifetime name `'b`
178  --> $DIR/feature-gate-in_band_lifetimes.rs:57:27
179   |
180LL |     fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
181   |                           ^^ undeclared lifetime
182   |
183help: consider introducing lifetime `'b` here
184   |
185LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
186   |     ^^^^
187help: consider introducing lifetime `'b` here
188   |
189LL |     fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 }
190   |                         ^^^^
191
192error[E0261]: use of undeclared lifetime name `'b`
193  --> $DIR/feature-gate-in_band_lifetimes.rs:57:40
194   |
195LL |     fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
196   |                                        ^^ undeclared lifetime
197   |
198help: consider introducing lifetime `'b` here
199   |
200LL | impl<'b> MyTrait<'a> for Y<&'a u8> {
201   |     ^^^^
202help: consider introducing lifetime `'b` here
203   |
204LL |     fn borrowed_lifetime<'b>(&'b self) -> &'b u8 { &*self.0 }
205   |                         ^^^^
206
207error: aborting due to 17 previous errors
208
209For more information about this error, try `rustc --explain E0261`.