1 error[E0597]: `x` does not live long enough
2 --> $DIR/region-borrow-params-issue-29793-small.rs:19:34
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
10 | - borrowed value dropped before borrower
12 = note: values in a scope are dropped in the opposite order they are created
14 error[E0597]: `y` does not live long enough
15 --> $DIR/region-borrow-params-issue-29793-small.rs:19:45
17 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
18 | --------- ^ borrowed value does not live long enough
23 | - borrowed value dropped before borrower
25 = note: values in a scope are dropped in the opposite order they are created
27 error[E0597]: `x` does not live long enough
28 --> $DIR/region-borrow-params-issue-29793-small.rs:34:34
30 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
31 | --------- ^ borrowed value does not live long enough
36 | - borrowed value dropped before borrower
38 = note: values in a scope are dropped in the opposite order they are created
40 error[E0597]: `y` does not live long enough
41 --> $DIR/region-borrow-params-issue-29793-small.rs:34:45
43 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
44 | --------- ^ borrowed value does not live long enough
49 | - borrowed value dropped before borrower
51 = note: values in a scope are dropped in the opposite order they are created
53 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
54 --> $DIR/region-borrow-params-issue-29793-small.rs:65:17
56 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
57 | ^^^^^^^^^ - `x` is borrowed here
59 | may outlive borrowed value `x`
60 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
62 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
65 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
66 --> $DIR/region-borrow-params-issue-29793-small.rs:65:17
68 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
69 | ^^^^^^^^^ - `y` is borrowed here
71 | may outlive borrowed value `y`
72 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
74 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
77 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
78 --> $DIR/region-borrow-params-issue-29793-small.rs:76:17
80 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
81 | ^^^^^^^^^ - `x` is borrowed here
83 | may outlive borrowed value `x`
84 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
86 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
89 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
90 --> $DIR/region-borrow-params-issue-29793-small.rs:76:17
92 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
93 | ^^^^^^^^^ - `y` is borrowed here
95 | may outlive borrowed value `y`
96 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
98 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
101 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
102 --> $DIR/region-borrow-params-issue-29793-small.rs:100:21
104 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
105 | ^^^^^^^^^ - `x` is borrowed here
107 | may outlive borrowed value `x`
108 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
110 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
113 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
114 --> $DIR/region-borrow-params-issue-29793-small.rs:100:21
116 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
117 | ^^^^^^^^^ - `y` is borrowed here
119 | may outlive borrowed value `y`
120 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
122 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
125 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
126 --> $DIR/region-borrow-params-issue-29793-small.rs:114:21
128 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
129 | ^^^^^^^^^ - `x` is borrowed here
131 | may outlive borrowed value `x`
132 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
134 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
137 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
138 --> $DIR/region-borrow-params-issue-29793-small.rs:114:21
140 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
141 | ^^^^^^^^^ - `y` is borrowed here
143 | may outlive borrowed value `y`
144 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
146 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
149 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
150 --> $DIR/region-borrow-params-issue-29793-small.rs:142:21
152 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
153 | ^^^^^^^^^ - `x` is borrowed here
155 | may outlive borrowed value `x`
156 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
158 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
161 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
162 --> $DIR/region-borrow-params-issue-29793-small.rs:142:21
164 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
165 | ^^^^^^^^^ - `y` is borrowed here
167 | may outlive borrowed value `y`
168 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
170 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
173 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
174 --> $DIR/region-borrow-params-issue-29793-small.rs:157:21
176 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
177 | ^^^^^^^^^ - `x` is borrowed here
179 | may outlive borrowed value `x`
180 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
182 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
185 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
186 --> $DIR/region-borrow-params-issue-29793-small.rs:157:21
188 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
189 | ^^^^^^^^^ - `y` is borrowed here
191 | may outlive borrowed value `y`
192 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
194 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
197 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
198 --> $DIR/region-borrow-params-issue-29793-small.rs:185:21
200 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
201 | ^^^^^^^^^ - `x` is borrowed here
203 | may outlive borrowed value `x`
204 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
206 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
209 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
210 --> $DIR/region-borrow-params-issue-29793-small.rs:185:21
212 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
213 | ^^^^^^^^^ - `y` is borrowed here
215 | may outlive borrowed value `y`
216 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
218 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
221 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
222 --> $DIR/region-borrow-params-issue-29793-small.rs:199:21
224 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
225 | ^^^^^^^^^ - `x` is borrowed here
227 | may outlive borrowed value `x`
228 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
230 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
233 error[E0373]: closure may outlive the current function, but it borrows `y`, which is owned by the current function
234 --> $DIR/region-borrow-params-issue-29793-small.rs:199:21
236 LL | let f = |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
237 | ^^^^^^^^^ - `y` is borrowed here
239 | may outlive borrowed value `y`
240 help: to force the closure to take ownership of `y` (and any other referenced variables), use the `move` keyword
242 LL | let f = move |t: bool| if t { x } else { y }; // (separate errors for `x` vs `y`)
245 error: aborting due to 20 previous errors
247 Some errors occurred: E0373, E0597.
248 For more information about an error, try `rustc --explain E0373`.