1 error[E0597]: `x` does not live long enough
2 --> $DIR/region-borrow-params-issue-29793-small.rs:19:17
4 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
8 | - `x` dropped here while still borrowed
10 error[E0597]: `y` does not live long enough
11 --> $DIR/region-borrow-params-issue-29793-small.rs:19:17
13 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
17 | - `y` dropped here while still borrowed
19 error[E0597]: `x` does not live long enough
20 --> $DIR/region-borrow-params-issue-29793-small.rs:34:17
22 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
26 | - `x` dropped here while still borrowed
28 error[E0597]: `y` does not live long enough
29 --> $DIR/region-borrow-params-issue-29793-small.rs:34:17
31 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
35 | - `y` dropped here while still borrowed
37 error[E0597]: `x` does not live long enough
38 --> $DIR/region-borrow-params-issue-29793-small.rs:65:17
40 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
44 | - `x` dropped here while still borrowed
46 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 64:10...
47 --> $DIR/region-borrow-params-issue-29793-small.rs:64:10
49 LL | fn g<'a>(x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
52 error[E0597]: `y` does not live long enough
53 --> $DIR/region-borrow-params-issue-29793-small.rs:65:17
55 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
56 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
59 | - `y` dropped here while still borrowed
61 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 64:10...
62 --> $DIR/region-borrow-params-issue-29793-small.rs:64:10
64 LL | fn g<'a>(x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
67 error[E0597]: `x` does not live long enough
68 --> $DIR/region-borrow-params-issue-29793-small.rs:76:17
70 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
71 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
74 | - `x` dropped here while still borrowed
76 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 75:10...
77 --> $DIR/region-borrow-params-issue-29793-small.rs:75:10
79 LL | fn g<'a>(x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
82 error[E0597]: `y` does not live long enough
83 --> $DIR/region-borrow-params-issue-29793-small.rs:76:17
85 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
89 | - `y` dropped here while still borrowed
91 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 75:10...
92 --> $DIR/region-borrow-params-issue-29793-small.rs:75:10
94 LL | fn g<'a>(x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
97 error[E0597]: `x` does not live long enough
98 --> $DIR/region-borrow-params-issue-29793-small.rs:100:21
100 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
101 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
104 | - `x` dropped here while still borrowed
106 note: borrowed value must be valid for the lifetime 'a as defined on the method body at 99:14...
107 --> $DIR/region-borrow-params-issue-29793-small.rs:99:14
109 LL | fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
112 error[E0597]: `y` does not live long enough
113 --> $DIR/region-borrow-params-issue-29793-small.rs:100:21
115 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
116 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
119 | - `y` dropped here while still borrowed
121 note: borrowed value must be valid for the lifetime 'a as defined on the method body at 99:14...
122 --> $DIR/region-borrow-params-issue-29793-small.rs:99:14
124 LL | fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
127 error[E0597]: `x` does not live long enough
128 --> $DIR/region-borrow-params-issue-29793-small.rs:114:21
130 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
131 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
134 | - `x` dropped here while still borrowed
136 note: borrowed value must be valid for the lifetime 'a as defined on the method body at 113:14...
137 --> $DIR/region-borrow-params-issue-29793-small.rs:113:14
139 LL | fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
142 error[E0597]: `y` does not live long enough
143 --> $DIR/region-borrow-params-issue-29793-small.rs:114:21
145 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
146 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
149 | - `y` dropped here while still borrowed
151 note: borrowed value must be valid for the lifetime 'a as defined on the method body at 113:14...
152 --> $DIR/region-borrow-params-issue-29793-small.rs:113:14
154 LL | fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
157 error[E0597]: `x` does not live long enough
158 --> $DIR/region-borrow-params-issue-29793-small.rs:142:21
160 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
161 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
164 | - `x` dropped here while still borrowed
166 note: borrowed value must be valid for the lifetime 'a as defined on the method body at 141:14...
167 --> $DIR/region-borrow-params-issue-29793-small.rs:141:14
169 LL | fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
172 error[E0597]: `y` does not live long enough
173 --> $DIR/region-borrow-params-issue-29793-small.rs:142:21
175 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
176 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
179 | - `y` dropped here while still borrowed
181 note: borrowed value must be valid for the lifetime 'a as defined on the method body at 141:14...
182 --> $DIR/region-borrow-params-issue-29793-small.rs:141:14
184 LL | fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
187 error[E0597]: `x` does not live long enough
188 --> $DIR/region-borrow-params-issue-29793-small.rs:157:21
190 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
191 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
194 | - `x` dropped here while still borrowed
196 note: borrowed value must be valid for the lifetime 'a as defined on the method body at 156:14...
197 --> $DIR/region-borrow-params-issue-29793-small.rs:156:14
199 LL | fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
202 error[E0597]: `y` does not live long enough
203 --> $DIR/region-borrow-params-issue-29793-small.rs:157:21
205 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
206 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
209 | - `y` dropped here while still borrowed
211 note: borrowed value must be valid for the lifetime 'a as defined on the method body at 156:14...
212 --> $DIR/region-borrow-params-issue-29793-small.rs:156:14
214 LL | fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
217 error[E0597]: `x` does not live long enough
218 --> $DIR/region-borrow-params-issue-29793-small.rs:185:21
220 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
221 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
224 | - `x` dropped here while still borrowed
226 note: borrowed value must be valid for the lifetime 'a as defined on the method body at 184:14...
227 --> $DIR/region-borrow-params-issue-29793-small.rs:184:14
229 LL | fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
232 error[E0597]: `y` does not live long enough
233 --> $DIR/region-borrow-params-issue-29793-small.rs:185:21
235 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
236 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
239 | - `y` dropped here while still borrowed
241 note: borrowed value must be valid for the lifetime 'a as defined on the method body at 184:14...
242 --> $DIR/region-borrow-params-issue-29793-small.rs:184:14
244 LL | fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
247 error[E0597]: `x` does not live long enough
248 --> $DIR/region-borrow-params-issue-29793-small.rs:199:21
250 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
251 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
254 | - `x` dropped here while still borrowed
256 note: borrowed value must be valid for the lifetime 'a as defined on the method body at 198:14...
257 --> $DIR/region-borrow-params-issue-29793-small.rs:198:14
259 LL | fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
262 error[E0597]: `y` does not live long enough
263 --> $DIR/region-borrow-params-issue-29793-small.rs:199:21
265 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
266 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
269 | - `y` dropped here while still borrowed
271 note: borrowed value must be valid for the lifetime 'a as defined on the method body at 198:14...
272 --> $DIR/region-borrow-params-issue-29793-small.rs:198:14
274 LL | fn g<'a>(&self, x: usize, y:usize) -> Box<Fn(bool) -> usize + 'a> {
277 error: aborting due to 20 previous errors
279 For more information about this error, try `rustc --explain E0597`.