]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr
d33f672229860ea9f703e3d4a21dbf8833618416
[rust.git] / src / test / ui / nll / ty-outlives / projection-one-region-closure.stderr
1 note: External requirements
2   --> $DIR/projection-one-region-closure.rs:45:29
3    |
4 LL |     with_signature(cell, t, |cell, t| require(cell, t));
5    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: defining type: DefId(0:19 ~ projection_one_region_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [
8                '_#1r,
9                T,
10                i32,
11                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
12            ]
13    = note: late-bound region is '_#3r
14    = note: number of external vids: 4
15    = note: where T: '_#2r
16    = note: where '_#1r: '_#2r
17
18 note: No external requirements
19   --> $DIR/projection-one-region-closure.rs:41:1
20    |
21 LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
22 LL | | where
23 LL | |     T: Anything<'b>,
24 LL | | {
25 ...  |
26 LL | |
27 LL | | }
28    | |_^
29    |
30    = note: defining type: DefId(0:15 ~ projection_one_region_closure[317d]::no_relationships_late[0]) with substs [
31                '_#1r,
32                T,
33            ]
34
35 error[E0309]: the parameter type `T` may not live long enough
36   --> $DIR/projection-one-region-closure.rs:45:29
37    |
38 LL |     with_signature(cell, t, |cell, t| require(cell, t));
39    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
40    |
41    = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:15 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(16), 'a))`...
42
43 error: lifetime may not live long enough
44   --> $DIR/projection-one-region-closure.rs:45:39
45    |
46 LL | fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
47    |                          --  -- lifetime `'b` defined here
48    |                          |
49    |                          lifetime `'a` defined here
50 ...
51 LL |     with_signature(cell, t, |cell, t| require(cell, t));
52    |                                       ^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
53    |
54    = help: consider adding the following bound: `'b: 'a`
55
56 note: External requirements
57   --> $DIR/projection-one-region-closure.rs:56:29
58    |
59 LL |     with_signature(cell, t, |cell, t| require(cell, t));
60    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
61    |
62    = note: defining type: DefId(0:24 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [
63                '_#1r,
64                '_#2r,
65                T,
66                i32,
67                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
68            ]
69    = note: number of external vids: 4
70    = note: where T: '_#3r
71    = note: where '_#2r: '_#3r
72
73 note: No external requirements
74   --> $DIR/projection-one-region-closure.rs:51:1
75    |
76 LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
77 LL | | where
78 LL | |     T: Anything<'b>,
79 LL | |     'a: 'a,
80 ...  |
81 LL | |
82 LL | | }
83    | |_^
84    |
85    = note: defining type: DefId(0:20 ~ projection_one_region_closure[317d]::no_relationships_early[0]) with substs [
86                '_#1r,
87                '_#2r,
88                T,
89            ]
90
91 error[E0309]: the parameter type `T` may not live long enough
92   --> $DIR/projection-one-region-closure.rs:56:29
93    |
94 LL |     with_signature(cell, t, |cell, t| require(cell, t));
95    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
96    |
97    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
98
99 error: lifetime may not live long enough
100   --> $DIR/projection-one-region-closure.rs:56:39
101    |
102 LL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
103    |                           --  -- lifetime `'b` defined here
104    |                           |
105    |                           lifetime `'a` defined here
106 ...
107 LL |     with_signature(cell, t, |cell, t| require(cell, t));
108    |                                       ^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
109    |
110    = help: consider adding the following bound: `'b: 'a`
111
112 note: External requirements
113   --> $DIR/projection-one-region-closure.rs:70:29
114    |
115 LL |     with_signature(cell, t, |cell, t| require(cell, t));
116    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
117    |
118    = note: defining type: DefId(0:29 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [
119                '_#1r,
120                '_#2r,
121                T,
122                i32,
123                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
124            ]
125    = note: number of external vids: 4
126    = note: where <T as Anything<ReClosureBound('_#2r)>>::AssocType: '_#3r
127
128 note: No external requirements
129   --> $DIR/projection-one-region-closure.rs:62:1
130    |
131 LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
132 LL | | where
133 LL | |     T: Anything<'b>,
134 LL | |     T::AssocType: 'a,
135 ...  |
136 LL | |     with_signature(cell, t, |cell, t| require(cell, t));
137 LL | | }
138    | |_^
139    |
140    = note: defining type: DefId(0:25 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [
141                '_#1r,
142                '_#2r,
143                T,
144            ]
145
146 note: External requirements
147   --> $DIR/projection-one-region-closure.rs:80:29
148    |
149 LL |     with_signature(cell, t, |cell, t| require(cell, t));
150    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
151    |
152    = note: defining type: DefId(0:34 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [
153                '_#1r,
154                '_#2r,
155                T,
156                i32,
157                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
158            ]
159    = note: number of external vids: 4
160    = note: where T: '_#3r
161    = note: where '_#2r: '_#3r
162
163 note: No external requirements
164   --> $DIR/projection-one-region-closure.rs:74:1
165    |
166 LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
167 LL | | where
168 LL | |     T: Anything<'b>,
169 LL | |     T: 'a,
170 ...  |
171 LL | |     with_signature(cell, t, |cell, t| require(cell, t));
172 LL | | }
173    | |_^
174    |
175    = note: defining type: DefId(0:30 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [
176                '_#1r,
177                '_#2r,
178                T,
179            ]
180
181 error: aborting due to 4 previous errors
182
183 For more information about this error, try `rustc --explain E0309`.