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