]>
Commit | Line | Data |
---|---|---|
7cac9316 | 1 | error[E0597]: `x` does not live long enough |
48663c56 | 2 | --> $DIR/vec_refs_data_with_early_death.rs:17:12 |
c30ab7b3 | 3 | | |
0531ce1d | 4 | LL | v.push(&x); |
48663c56 | 5 | | ^^ borrowed value does not live long enough |
c30ab7b3 | 6 | ... |
0531ce1d | 7 | LL | } |
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 | 15 | error[E0597]: `y` does not live long enough |
48663c56 | 16 | --> $DIR/vec_refs_data_with_early_death.rs:19:12 |
c30ab7b3 | 17 | | |
0531ce1d | 18 | LL | v.push(&y); |
48663c56 | 19 | | ^^ borrowed value does not live long enough |
c30ab7b3 | 20 | ... |
0531ce1d | 21 | LL | } |
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 | 29 | error: aborting due to 2 previous errors |
c30ab7b3 | 30 | |
0531ce1d | 31 | For more information about this error, try `rustc --explain E0597`. |