fork/rust

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

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

master
1.2 KiB35 linesraw
1error[E0597]: `v` does not live long enough
2  --> $DIR/method-ufcs-inherent-4.rs:15:37
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::<&'a u32>(&v, &v);
9   |             ------------------------^^-----
10   |             |                       |
11   |             |                       borrowed value does not live long enough
12   |             argument requires that `v` is borrowed for `'a`
13...
14LL | }
15   | - `v` dropped here while still borrowed
16
17error[E0597]: `v` does not live long enough
18  --> $DIR/method-ufcs-inherent-4.rs:15:41
19   |
20LL | fn foo<'a>() {
21   |        -- lifetime `'a` defined here
22LL |     let v = 22;
23   |         - binding `v` declared here
24LL |     let x = <A<'a>>::new::<&'a u32>(&v, &v);
25   |             ----------------------------^^-
26   |             |                           |
27   |             |                           borrowed value does not live long enough
28   |             argument requires that `v` is borrowed for `'a`
29...
30LL | }
31   | - `v` dropped here while still borrowed
32
33error: aborting due to 2 previous errors
34
35For more information about this error, try `rustc --explain E0597`.