]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr
Don't ICE on tuple struct ctor with incorrect arg count
[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:49: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:60: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:81: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:109: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:49: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: 4
39    = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#2r)>>::AssocType: '_#3r
40
41 error[E0309]: the associated type `<T as Anything<'_#5r, '_#6r>>::AssocType` may not live long enough
42   --> $DIR/projection-two-region-trait-bound-closure.rs:49:29
43    |
44 LL |     with_signature(cell, t, |cell, t| require(cell, t));
45    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
46    |
47    = help: consider adding an explicit lifetime bound `<T as Anything<'_#5r, '_#6r>>::AssocType: ReFree(DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), 'a))`...
48
49 note: No external requirements
50   --> $DIR/projection-two-region-trait-bound-closure.rs:45:1
51    |
52 LL | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
53 LL | | where
54 LL | |     T: Anything<'b, 'c>,
55 LL | | {
56 ...  |
57 LL | |     //~| ERROR associated type `<T as Anything<'_#5r, '_#6r>>::AssocType` may not live long enough
58 LL | | }
59    | |_^
60    |
61    = note: defining type: DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [
62                '_#1r,
63                '_#2r,
64                T
65            ]
66
67 note: External requirements
68   --> $DIR/projection-two-region-trait-bound-closure.rs:60: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: 5
82    = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r
83
84 error[E0309]: the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough
85   --> $DIR/projection-two-region-trait-bound-closure.rs:60:29
86    |
87 LL |     with_signature(cell, t, |cell, t| require(cell, t));
88    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
89    |
90    = help: consider adding an explicit lifetime bound `<T as Anything<'_#6r, '_#7r>>::AssocType: ReEarlyBound(0, 'a)`...
91
92 note: No external requirements
93   --> $DIR/projection-two-region-trait-bound-closure.rs:55:1
94    |
95 LL | / fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
96 LL | | where
97 LL | |     T: Anything<'b, 'c>,
98 LL | |     'a: 'a,
99 ...  |
100 LL | |     //~| ERROR associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough
101 LL | | }
102    | |_^
103    |
104    = note: defining type: DefId(0/0:9 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [
105                '_#1r,
106                '_#2r,
107                '_#3r,
108                T
109            ]
110
111 note: External requirements
112   --> $DIR/projection-two-region-trait-bound-closure.rs:81: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: 5
126    = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r
127
128 error[E0309]: the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough
129   --> $DIR/projection-two-region-trait-bound-closure.rs:81:29
130    |
131 LL |     with_signature(cell, t, |cell, t| require(cell, t));
132    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
133    |
134    = help: consider adding an explicit lifetime bound `<T as Anything<'_#6r, '_#7r>>::AssocType: ReEarlyBound(0, 'a)`...
135
136 note: No external requirements
137   --> $DIR/projection-two-region-trait-bound-closure.rs:66:1
138    |
139 LL | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
140 LL | | where
141 LL | |     T: Anything<'b, 'c>,
142 LL | |     T::AssocType: 'a,
143 ...  |
144 LL | |     //~| ERROR associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough
145 LL | | }
146    | |_^
147    |
148    = note: defining type: DefId(0/0:10 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [
149                '_#1r,
150                '_#2r,
151                '_#3r,
152                T
153            ]
154
155 note: External requirements
156   --> $DIR/projection-two-region-trait-bound-closure.rs:92: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: 5
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:87: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:101: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: 5
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:96: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:109: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: 3
240    = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r
241
242 error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:43), 'a))`
243   --> $DIR/projection-two-region-trait-bound-closure.rs:109:20
244    |
245 LL |     with_signature(cell, t, |cell, t| require(cell, t));
246    |                    ^^^^
247
248 note: No external requirements
249   --> $DIR/projection-two-region-trait-bound-closure.rs:105:1
250    |
251 LL | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
252 LL | | where
253 LL | |     T: Anything<'b, 'b>,
254 LL | | {
255 ...  |
256 LL | |     //~| ERROR does not outlive free region
257 LL | | }
258    | |_^
259    |
260    = note: defining type: DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [
261                '_#1r,
262                T
263            ]
264
265 note: External requirements
266   --> $DIR/projection-two-region-trait-bound-closure.rs:120: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: 4
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:115: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:132: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: 3
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:124: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`.