]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
1452573d57a255226ea99e8461ab4d7331f1ed40
[rust.git] / src / test / ui / nll / ty-outlives / projection-two-region-trait-bound-closure.stderr
1 warning: not reporting region error due to nll
2   --> $DIR/projection-two-region-trait-bound-closure.rs:48:39
3    |
4 LL |     with_signature(cell, t, |cell, t| require(cell, t));
5    |                                       ^^^^^^^
6
7 warning: not reporting region error due to nll
8   --> $DIR/projection-two-region-trait-bound-closure.rs:59:39
9    |
10 LL |     with_signature(cell, t, |cell, t| require(cell, t));
11    |                                       ^^^^^^^
12
13 warning: not reporting region error due to nll
14   --> $DIR/projection-two-region-trait-bound-closure.rs:80:39
15    |
16 LL |     with_signature(cell, t, |cell, t| require(cell, t));
17    |                                       ^^^^^^^
18
19 warning: not reporting region error due to nll
20   --> $DIR/projection-two-region-trait-bound-closure.rs:108:39
21    |
22 LL |     with_signature(cell, t, |cell, t| require(cell, t));
23    |                                       ^^^^^^^
24
25 note: External requirements
26   --> $DIR/projection-two-region-trait-bound-closure.rs:48:29
27    |
28 LL |     with_signature(cell, t, |cell, t| require(cell, t));
29    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
30    |
31    = note: defining type: DefId(0/1:22 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [
32                '_#1r,
33                '_#2r,
34                T,
35                i32,
36                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
37            ]
38    = note: number of external vids: 6
39    = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#2r)>>::AssocType: '_#3r
40
41 note: No external requirements
42   --> $DIR/projection-two-region-trait-bound-closure.rs:44:1
43    |
44 LL | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
45 LL | | where
46 LL | |     T: Anything<'b, 'c>,
47 LL | | {
48 ...  |
49 LL | |     //~| ERROR associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough
50 LL | | }
51    | |_^
52    |
53    = note: defining type: DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [
54                '_#1r,
55                '_#2r,
56                T
57            ]
58
59 error[E0309]: the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough
60   --> $DIR/projection-two-region-trait-bound-closure.rs:48:29
61    |
62 LL |     with_signature(cell, t, |cell, t| require(cell, t));
63    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
64    |
65    = help: consider adding an explicit lifetime bound `<T as Anything<'_#6r, '_#7r>>::AssocType: ReFree(DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), 'a))`...
66
67 note: External requirements
68   --> $DIR/projection-two-region-trait-bound-closure.rs:59:29
69    |
70 LL |     with_signature(cell, t, |cell, t| require(cell, t));
71    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
72    |
73    = note: defining type: DefId(0/1:27 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [
74                '_#1r,
75                '_#2r,
76                '_#3r,
77                T,
78                i32,
79                extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T))
80            ]
81    = note: number of external vids: 6
82    = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r
83
84 note: No external requirements
85   --> $DIR/projection-two-region-trait-bound-closure.rs:54:1
86    |
87 LL | / fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
88 LL | | where
89 LL | |     T: Anything<'b, 'c>,
90 LL | |     'a: 'a,
91 ...  |
92 LL | |     //~| ERROR associated type `<T as Anything<'_#7r, '_#8r>>::AssocType` may not live long enough
93 LL | | }
94    | |_^
95    |
96    = note: defining type: DefId(0/0:9 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [
97                '_#1r,
98                '_#2r,
99                '_#3r,
100                T
101            ]
102
103 error[E0309]: the associated type `<T as Anything<'_#7r, '_#8r>>::AssocType` may not live long enough
104   --> $DIR/projection-two-region-trait-bound-closure.rs:59:29
105    |
106 LL |     with_signature(cell, t, |cell, t| require(cell, t));
107    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
108    |
109    = help: consider adding an explicit lifetime bound `<T as Anything<'_#7r, '_#8r>>::AssocType: ReEarlyBound(0, 'a)`...
110
111 note: External requirements
112   --> $DIR/projection-two-region-trait-bound-closure.rs:80:29
113    |
114 LL |     with_signature(cell, t, |cell, t| require(cell, t));
115    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
116    |
117    = note: defining type: DefId(0/1:32 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [
118                '_#1r,
119                '_#2r,
120                '_#3r,
121                T,
122                i32,
123                extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T))
124            ]
125    = note: number of external vids: 6
126    = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r
127
128 note: No external requirements
129   --> $DIR/projection-two-region-trait-bound-closure.rs:65:1
130    |
131 LL | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
132 LL | | where
133 LL | |     T: Anything<'b, 'c>,
134 LL | |     T::AssocType: 'a,
135 ...  |
136 LL | |     //~| ERROR associated type `<T as Anything<'_#7r, '_#8r>>::AssocType` may not live long enough
137 LL | | }
138    | |_^
139    |
140    = note: defining type: DefId(0/0:10 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [
141                '_#1r,
142                '_#2r,
143                '_#3r,
144                T
145            ]
146
147 error[E0309]: the associated type `<T as Anything<'_#7r, '_#8r>>::AssocType` may not live long enough
148   --> $DIR/projection-two-region-trait-bound-closure.rs:80:29
149    |
150 LL |     with_signature(cell, t, |cell, t| require(cell, t));
151    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
152    |
153    = help: consider adding an explicit lifetime bound `<T as Anything<'_#7r, '_#8r>>::AssocType: ReEarlyBound(0, 'a)`...
154
155 note: External requirements
156   --> $DIR/projection-two-region-trait-bound-closure.rs:91:29
157    |
158 LL |     with_signature(cell, t, |cell, t| require(cell, t));
159    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
160    |
161    = note: defining type: DefId(0/1:37 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [
162                '_#1r,
163                '_#2r,
164                '_#3r,
165                T,
166                i32,
167                extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T))
168            ]
169    = note: number of external vids: 6
170    = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r
171
172 note: No external requirements
173   --> $DIR/projection-two-region-trait-bound-closure.rs:86:1
174    |
175 LL | / fn elements_outlive1<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
176 LL | | where
177 LL | |     T: Anything<'b, 'c>,
178 LL | |     'b: 'a,
179 LL | | {
180 LL | |     with_signature(cell, t, |cell, t| require(cell, t));
181 LL | | }
182    | |_^
183    |
184    = note: defining type: DefId(0/0:11 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]) with substs [
185                '_#1r,
186                '_#2r,
187                '_#3r,
188                T
189            ]
190
191 note: External requirements
192   --> $DIR/projection-two-region-trait-bound-closure.rs:100:29
193    |
194 LL |     with_signature(cell, t, |cell, t| require(cell, t));
195    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
196    |
197    = note: defining type: DefId(0/1:42 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]::{{closure}}[0]) with closure substs [
198                '_#1r,
199                '_#2r,
200                '_#3r,
201                T,
202                i32,
203                extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T))
204            ]
205    = note: number of external vids: 6
206    = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r
207
208 note: No external requirements
209   --> $DIR/projection-two-region-trait-bound-closure.rs:95:1
210    |
211 LL | / fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
212 LL | | where
213 LL | |     T: Anything<'b, 'c>,
214 LL | |     'c: 'a,
215 LL | | {
216 LL | |     with_signature(cell, t, |cell, t| require(cell, t));
217 LL | | }
218    | |_^
219    |
220    = note: defining type: DefId(0/0:12 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [
221                '_#1r,
222                '_#2r,
223                '_#3r,
224                T
225            ]
226
227 note: External requirements
228   --> $DIR/projection-two-region-trait-bound-closure.rs:108:29
229    |
230 LL |     with_signature(cell, t, |cell, t| require(cell, t));
231    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
232    |
233    = note: defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [
234                '_#1r,
235                T,
236                i32,
237                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
238            ]
239    = note: number of external vids: 5
240    = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r
241
242 note: No external requirements
243   --> $DIR/projection-two-region-trait-bound-closure.rs:104:1
244    |
245 LL | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
246 LL | | where
247 LL | |     T: Anything<'b, 'b>,
248 LL | | {
249 ...  |
250 LL | |     //~| ERROR
251 LL | | }
252    | |_^
253    |
254    = note: defining type: DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [
255                '_#1r,
256                T
257            ]
258
259 error: unsatisfied lifetime constraints
260   --> $DIR/projection-two-region-trait-bound-closure.rs:108:5
261    |
262 LL |     with_signature(cell, t, |cell, t| require(cell, t));
263    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
264
265 note: External requirements
266   --> $DIR/projection-two-region-trait-bound-closure.rs:119:29
267    |
268 LL |     with_signature(cell, t, |cell, t| require(cell, t));
269    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
270    |
271    = note: defining type: DefId(0/1:50 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [
272                '_#1r,
273                '_#2r,
274                T,
275                i32,
276                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
277            ]
278    = note: number of external vids: 5
279    = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#2r)>>::AssocType: '_#3r
280
281 note: No external requirements
282   --> $DIR/projection-two-region-trait-bound-closure.rs:114:1
283    |
284 LL | / fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
285 LL | | where
286 LL | |     T: Anything<'b, 'b>,
287 LL | |     'b: 'a,
288 LL | | {
289 LL | |     with_signature(cell, t, |cell, t| require(cell, t));
290 LL | | }
291    | |_^
292    |
293    = note: defining type: DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [
294                '_#1r,
295                '_#2r,
296                T
297            ]
298
299 note: External requirements
300   --> $DIR/projection-two-region-trait-bound-closure.rs:131:29
301    |
302 LL |     with_signature(cell, t, |cell, t| require(cell, t));
303    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
304    |
305    = note: defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [
306                '_#1r,
307                T,
308                i32,
309                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
310            ]
311    = note: number of external vids: 4
312    = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r
313
314 note: No external requirements
315   --> $DIR/projection-two-region-trait-bound-closure.rs:123:1
316    |
317 LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)
318 LL | | where
319 LL | |     T: Anything<'a, 'a>,
320 LL | | {
321 ...  |
322 LL | |     with_signature(cell, t, |cell, t| require(cell, t));
323 LL | | }
324    | |_^
325    |
326    = note: defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [
327                '_#1r,
328                T
329            ]
330
331 error: aborting due to 4 previous errors
332
333 For more information about this error, try `rustc --explain E0309`.