1 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
2 --> $DIR/region-borrow-params-issue-29793-small.rs:9:17
4 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
5 | ^^^^^^^^^ - `x` is borrowed here
7 | may outlive borrowed value `x`
9 note: closure is returned here
10 --> $DIR/region-borrow-params-issue-29793-small.rs:12:16
14 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
16 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
19 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
20 --> $DIR/region-borrow-params-issue-29793-small.rs:9:17
22 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
23 | ^^^^^^^^^ - `y` is borrowed here
25 | may outlive borrowed value `y`
27 note: closure is returned here
28 --> $DIR/region-borrow-params-issue-29793-small.rs:12:16
32 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
34 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
37 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
38 --> $DIR/region-borrow-params-issue-29793-small.rs:24:17
40 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
41 | ^^^^^^^^^ - `x` is borrowed here
43 | may outlive borrowed value `x`
45 note: closure is returned here
46 --> $DIR/region-borrow-params-issue-29793-small.rs:27:9
50 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
52 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
55 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
56 --> $DIR/region-borrow-params-issue-29793-small.rs:24:17
58 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
59 | ^^^^^^^^^ - `y` is borrowed here
61 | may outlive borrowed value `y`
63 note: closure is returned here
64 --> $DIR/region-borrow-params-issue-29793-small.rs:27:9
68 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
70 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
73 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
74 --> $DIR/region-borrow-params-issue-29793-small.rs:55:17
76 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
77 | ^^^^^^^^^ - `x` is borrowed here
79 | may outlive borrowed value `x`
81 note: closure is returned here
82 --> $DIR/region-borrow-params-issue-29793-small.rs:58:16
84 LL | return Box::new(f);
86 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
88 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
91 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
92 --> $DIR/region-borrow-params-issue-29793-small.rs:55:17
94 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
95 | ^^^^^^^^^ - `y` is borrowed here
97 | may outlive borrowed value `y`
99 note: closure is returned here
100 --> $DIR/region-borrow-params-issue-29793-small.rs:58:16
102 LL | return Box::new(f);
104 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
106 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
109 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
110 --> $DIR/region-borrow-params-issue-29793-small.rs:66:17
112 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
113 | ^^^^^^^^^ - `x` is borrowed here
115 | may outlive borrowed value `x`
117 note: closure is returned here
118 --> $DIR/region-borrow-params-issue-29793-small.rs:69:9
122 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
124 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
127 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
128 --> $DIR/region-borrow-params-issue-29793-small.rs:66:17
130 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
131 | ^^^^^^^^^ - `y` is borrowed here
133 | may outlive borrowed value `y`
135 note: closure is returned here
136 --> $DIR/region-borrow-params-issue-29793-small.rs:69:9
140 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
142 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
145 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
146 --> $DIR/region-borrow-params-issue-29793-small.rs:90:21
148 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
149 | ^^^^^^^^^ - `x` is borrowed here
151 | may outlive borrowed value `x`
153 note: closure is returned here
154 --> $DIR/region-borrow-params-issue-29793-small.rs:93:20
156 LL | return Box::new(f);
158 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
160 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
163 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
164 --> $DIR/region-borrow-params-issue-29793-small.rs:90:21
166 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
167 | ^^^^^^^^^ - `y` is borrowed here
169 | may outlive borrowed value `y`
171 note: closure is returned here
172 --> $DIR/region-borrow-params-issue-29793-small.rs:93:20
174 LL | return Box::new(f);
176 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
178 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
181 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
182 --> $DIR/region-borrow-params-issue-29793-small.rs:104:21
184 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
185 | ^^^^^^^^^ - `x` is borrowed here
187 | may outlive borrowed value `x`
189 note: closure is returned here
190 --> $DIR/region-borrow-params-issue-29793-small.rs:107:13
194 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
196 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
199 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
200 --> $DIR/region-borrow-params-issue-29793-small.rs:104:21
202 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
203 | ^^^^^^^^^ - `y` is borrowed here
205 | may outlive borrowed value `y`
207 note: closure is returned here
208 --> $DIR/region-borrow-params-issue-29793-small.rs:107:13
212 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
214 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
217 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
218 --> $DIR/region-borrow-params-issue-29793-small.rs:132:21
220 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
221 | ^^^^^^^^^ - `x` is borrowed here
223 | may outlive borrowed value `x`
225 note: closure is returned here
226 --> $DIR/region-borrow-params-issue-29793-small.rs:135:20
228 LL | return Box::new(f);
230 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
232 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
235 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
236 --> $DIR/region-borrow-params-issue-29793-small.rs:132:21
238 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
239 | ^^^^^^^^^ - `y` is borrowed here
241 | may outlive borrowed value `y`
243 note: closure is returned here
244 --> $DIR/region-borrow-params-issue-29793-small.rs:135:20
246 LL | return Box::new(f);
248 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
250 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
253 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
254 --> $DIR/region-borrow-params-issue-29793-small.rs:147:21
256 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
257 | ^^^^^^^^^ - `x` is borrowed here
259 | may outlive borrowed value `x`
261 note: closure is returned here
262 --> $DIR/region-borrow-params-issue-29793-small.rs:150:13
266 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
268 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
271 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
272 --> $DIR/region-borrow-params-issue-29793-small.rs:147:21
274 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
275 | ^^^^^^^^^ - `y` is borrowed here
277 | may outlive borrowed value `y`
279 note: closure is returned here
280 --> $DIR/region-borrow-params-issue-29793-small.rs:150:13
284 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
286 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
289 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
290 --> $DIR/region-borrow-params-issue-29793-small.rs:175:21
292 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
293 | ^^^^^^^^^ - `x` is borrowed here
295 | may outlive borrowed value `x`
297 note: closure is returned here
298 --> $DIR/region-borrow-params-issue-29793-small.rs:178:20
300 LL | return Box::new(f);
302 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
304 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
307 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
308 --> $DIR/region-borrow-params-issue-29793-small.rs:175:21
310 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
311 | ^^^^^^^^^ - `y` is borrowed here
313 | may outlive borrowed value `y`
315 note: closure is returned here
316 --> $DIR/region-borrow-params-issue-29793-small.rs:178:20
318 LL | return Box::new(f);
320 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
322 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
325 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
326 --> $DIR/region-borrow-params-issue-29793-small.rs:189:21
328 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
329 | ^^^^^^^^^ - `x` is borrowed here
331 | may outlive borrowed value `x`
333 note: closure is returned here
334 --> $DIR/region-borrow-params-issue-29793-small.rs:192:13
338 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
340 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
343 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
344 --> $DIR/region-borrow-params-issue-29793-small.rs:189:21
346 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
347 | ^^^^^^^^^ - `y` is borrowed here
349 | may outlive borrowed value `y`
351 note: closure is returned here
352 --> $DIR/region-borrow-params-issue-29793-small.rs:192:13
356 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
358 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
361 error: aborting due to 20 previous errors
363 For more information about this error, try `rustc --explain E0373`.