]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/region-borrow-params-issue-29793-big.ast.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / regions / region-borrow-params-issue-29793-big.ast.stderr
1 error[E0597]: `x` does not live long enough
2   --> $DIR/region-borrow-params-issue-29793-big.rs:81:43
3    |
4 LL |         WrapB::new().set(|t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`)
5    |                          ---------        ^ borrowed value does not live long enough
6    |                          |
7    |                          capture occurs here
8 ...
9 LL |     });
10    |     - borrowed value dropped before borrower
11    |
12    = note: values in a scope are dropped in the opposite order they are created
13
14 error[E0597]: `y` does not live long enough
15   --> $DIR/region-borrow-params-issue-29793-big.rs:81:54
16    |
17 LL |         WrapB::new().set(|t: bool| if t { x } else { y }) // (separate errors for `x` vs `y`)
18    |                          ---------                   ^ borrowed value does not live long enough
19    |                          |
20    |                          capture occurs here
21 ...
22 LL |     });
23    |     - borrowed value dropped before borrower
24    |
25    = note: values in a scope are dropped in the opposite order they are created
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0597`.