]>
Commit | Line | Data |
---|---|---|
7cac9316 | 1 | error[E0597]: `container` does not live long enough |
48663c56 | 2 | --> $DIR/issue-25199.rs:70:27 |
c30ab7b3 | 3 | | |
9ffffee4 FG |
4 | LL | let container = Container::new(); |
5 | | --------- binding `container` declared here | |
0531ce1d | 6 | LL | let test = Test{test: &container}; |
48663c56 | 7 | | ^^^^^^^^^^ borrowed value does not live long enough |
c30ab7b3 | 8 | ... |
0531ce1d | 9 | LL | } |
48663c56 XL |
10 | | - |
11 | | | | |
12 | | `container` dropped here while still borrowed | |
13 | | borrow might be used here, when `container` is dropped and runs the destructor for type `Container<'_>` | |
c30ab7b3 | 14 | |
48663c56 | 15 | error: aborting due to previous error |
c30ab7b3 | 16 | |
0531ce1d | 17 | For more information about this error, try `rustc --explain E0597`. |