fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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