]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0597]: `p` does not live long enough |
48663c56 | 2 | --> $DIR/issue-18118.rs:4:9 |
8faf50e0 | 3 | | |
49aad941 FG |
4 | LL | let p = 3; |
5 | | - binding `p` declared here | |
532ac7d7 | 6 | LL | &p |
48663c56 XL |
7 | | ^^ |
8 | | | | |
9 | | borrowed value does not live long enough | |
10 | | using this value as a constant requires that `p` is borrowed for `'static` | |
8faf50e0 | 11 | LL | }; |
48663c56 | 12 | | - `p` dropped here while still borrowed |
8faf50e0 | 13 | |
4b012472 | 14 | error: aborting due to 1 previous error |
8faf50e0 | 15 | |
0731742a | 16 | For more information about this error, try `rustc --explain E0597`. |