fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
585 B18 linesraw
1error[E0597]: `v` does not live long enough
2  --> $DIR/method-ufcs-inherent-3.rs:16:26
3   |
4LL | fn foo<'a>() {
5   |        -- lifetime `'a` defined here
6LL |     let v = 22;
7LL |     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`
12LL |
13LL | }
14   | - `v` dropped here while still borrowed
15
16error: aborting due to previous error
17
18For more information about this error, try `rustc --explain E0597`.