]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/method-ufcs-3.stderr
Auto merge of #106711 - albertlarsan68:use-ci-llvm-when-lld, r=jyn514
[rust.git] / tests / ui / nll / user-annotations / method-ufcs-3.stderr
1 error[E0597]: `c` does not live long enough
2   --> $DIR/method-ufcs-3.rs:36:53
3    |
4 LL |     <_ as Bazoom<_>>::method::<&'static u32>(&a, b, &c);
5    |     ------------------------------------------------^^-
6    |     |                                               |
7    |     |                                               borrowed value does not live long enough
8    |     argument requires that `c` is borrowed for `'static`
9 LL | }
10    | - `c` dropped here while still borrowed
11
12 error[E0597]: `c` does not live long enough
13   --> $DIR/method-ufcs-3.rs:43:48
14    |
15 LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
16    |                                   -- lifetime `'a` defined here
17 ...
18 LL |     <_ as Bazoom<_>>::method::<&'a u32>(&a, b, &c);
19    |     -------------------------------------------^^-
20    |     |                                          |
21    |     |                                          borrowed value does not live long enough
22    |     argument requires that `c` is borrowed for `'a`
23 LL | }
24    | - `c` dropped here while still borrowed
25
26 error[E0597]: `c` does not live long enough
27   --> $DIR/method-ufcs-3.rs:57:52
28    |
29 LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
30    |                                              -- lifetime `'a` defined here
31 ...
32 LL |         <_ as Bazoom<_>>::method::<&'a u32>(&a, b, &c);
33    |         -------------------------------------------^^-
34    |         |                                          |
35    |         |                                          borrowed value does not live long enough
36    |         argument requires that `c` is borrowed for `'a`
37 LL |     };
38    |     - `c` dropped here while still borrowed
39
40 error: aborting due to 3 previous errors
41
42 For more information about this error, try `rustc --explain E0597`.