]>
Commit | Line | Data |
---|---|---|
7cac9316 | 1 | error[E0597]: `first_dropped` does not live long enough |
416331ca | 2 | --> $DIR/issue28498-reject-lifetime-param.rs:32:19 |
c30ab7b3 | 3 | | |
9ffffee4 FG |
4 | LL | let (foo1, first_dropped); |
5 | | ------------- binding `first_dropped` declared here | |
6 | ... | |
0531ce1d | 7 | LL | foo1 = Foo(1, &first_dropped); |
48663c56 | 8 | | ^^^^^^^^^^^^^^ borrowed value does not live long enough |
c30ab7b3 | 9 | ... |
0531ce1d | 10 | LL | } |
48663c56 XL |
11 | | - |
12 | | | | |
13 | | `first_dropped` dropped here while still borrowed | |
14 | | borrow might be used here, when `foo1` is dropped and runs the `Drop` code for type `Foo` | |
c30ab7b3 | 15 | | |
48663c56 | 16 | = note: values in a scope are dropped in the opposite order they are defined |
c30ab7b3 | 17 | |
48663c56 | 18 | error: aborting due to previous error |
c30ab7b3 | 19 | |
0531ce1d | 20 | For more information about this error, try `rustc --explain E0597`. |