]> git.proxmox.com Git - rustc.git/blame - src/test/ui/span/vec_refs_data_with_early_death.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / span / vec_refs_data_with_early_death.stderr
CommitLineData
7cac9316 1error[E0597]: `x` does not live long enough
48663c56 2 --> $DIR/vec_refs_data_with_early_death.rs:17:12
c30ab7b3 3 |
0531ce1d 4LL | v.push(&x);
48663c56 5 | ^^ borrowed value does not live long enough
c30ab7b3 6...
0531ce1d 7LL | }
48663c56
XL
8 | -
9 | |
10 | `x` dropped here while still borrowed
11 | borrow might be used here, when `v` is dropped and runs the `Drop` code for type `Bag`
c30ab7b3 12 |
48663c56 13 = note: values in a scope are dropped in the opposite order they are defined
c30ab7b3 14
7cac9316 15error[E0597]: `y` does not live long enough
48663c56 16 --> $DIR/vec_refs_data_with_early_death.rs:19:12
c30ab7b3 17 |
0531ce1d 18LL | v.push(&y);
48663c56 19 | ^^ borrowed value does not live long enough
c30ab7b3 20...
0531ce1d 21LL | }
48663c56
XL
22 | -
23 | |
24 | `y` dropped here while still borrowed
25 | borrow might be used here, when `v` is dropped and runs the `Drop` code for type `Bag`
c30ab7b3 26 |
48663c56 27 = note: values in a scope are dropped in the opposite order they are defined
c30ab7b3 28
041b39d2 29error: aborting due to 2 previous errors
c30ab7b3 30
0531ce1d 31For more information about this error, try `rustc --explain E0597`.