fork/rust

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

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

master
2.0 KiB48 linesraw
1error[E0597]: `c` does not live long enough
2  --> $DIR/method-ufcs-3.rs:36:53
3   |
4LL |     let c = 66;
5   |         - binding `c` declared here
6LL |     <_ as Bazoom<_>>::method::<&'static u32>(&a, b, &c);
7   |     ------------------------------------------------^^-
8   |     |                                               |
9   |     |                                               borrowed value does not live long enough
10   |     argument requires that `c` is borrowed for `'static`
11LL | }
12   | - `c` dropped here while still borrowed
13
14error[E0597]: `c` does not live long enough
15  --> $DIR/method-ufcs-3.rs:43:48
16   |
17LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
18   |                                   -- lifetime `'a` defined here
19...
20LL |     let c = 66;
21   |         - binding `c` declared here
22LL |     <_ as Bazoom<_>>::method::<&'a u32>(&a, b, &c);
23   |     -------------------------------------------^^-
24   |     |                                          |
25   |     |                                          borrowed value does not live long enough
26   |     argument requires that `c` is borrowed for `'a`
27LL | }
28   | - `c` dropped here while still borrowed
29
30error[E0597]: `c` does not live long enough
31  --> $DIR/method-ufcs-3.rs:57:52
32   |
33LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
34   |                                              -- lifetime `'a` defined here
35...
36LL |         let c = 66;
37   |             - binding `c` declared here
38LL |         <_ as Bazoom<_>>::method::<&'a u32>(&a, b, &c);
39   |         -------------------------------------------^^-
40   |         |                                          |
41   |         |                                          borrowed value does not live long enough
42   |         argument requires that `c` is borrowed for `'a`
43LL |     };
44   |     - `c` dropped here while still borrowed
45
46error: aborting due to 3 previous errors
47
48For more information about this error, try `rustc --explain E0597`.