]>
Commit | Line | Data |
---|---|---|
0bf4aa26 | 1 | error[E0597]: `v` does not live long enough |
923072b8 | 2 | --> $DIR/method-ufcs-inherent-3.rs:14:26 |
0bf4aa26 XL |
3 | | |
4 | LL | fn foo<'a>() { | |
5 | | -- lifetime `'a` defined here | |
6 | LL | let v = 22; | |
7 | LL | let x = <A<'a>>::new(&v, 22); | |
8 | | -------------^^----- | |
9 | | | | | |
10 | | | borrowed value does not live long enough | |
11 | | argument requires that `v` is borrowed for `'a` | |
532ac7d7 | 12 | LL | |
0bf4aa26 XL |
13 | LL | } |
14 | | - `v` dropped here while still borrowed | |
15 | ||
16 | error: aborting due to previous error | |
17 | ||
18 | For more information about this error, try `rustc --explain E0597`. |