]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/constant-in-expr-inherent-2.stderr
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui / nll / user-annotations / constant-in-expr-inherent-2.stderr
1 error[E0597]: `x` does not live long enough
2   --> $DIR/constant-in-expr-inherent-2.rs:23:9
3    |
4 LL |     FUN(&x);
5    |     ----^^-
6    |     |   |
7    |     |   borrowed value does not live long enough
8    |     argument requires that `x` is borrowed for `'static`
9 ...
10 LL | }
11    | - `x` dropped here while still borrowed
12
13 error[E0597]: `x` does not live long enough
14   --> $DIR/constant-in-expr-inherent-2.rs:24:23
15    |
16 LL |     A::ASSOCIATED_FUN(&x);
17    |     ------------------^^-
18    |     |                 |
19    |     |                 borrowed value does not live long enough
20    |     argument requires that `x` is borrowed for `'static`
21 ...
22 LL | }
23    | - `x` dropped here while still borrowed
24
25 error[E0597]: `x` does not live long enough
26   --> $DIR/constant-in-expr-inherent-2.rs:25:28
27    |
28 LL |     B::ALSO_ASSOCIATED_FUN(&x);
29    |     -----------------------^^-
30    |     |                      |
31    |     |                      borrowed value does not live long enough
32    |     argument requires that `x` is borrowed for `'static`
33 LL |     <_>::TRAIT_ASSOCIATED_FUN(&x);
34 LL | }
35    | - `x` dropped here while still borrowed
36
37 error[E0597]: `x` does not live long enough
38   --> $DIR/constant-in-expr-inherent-2.rs:26:31
39    |
40 LL |     <_>::TRAIT_ASSOCIATED_FUN(&x);
41    |     --------------------------^^-
42    |     |                         |
43    |     |                         borrowed value does not live long enough
44    |     argument requires that `x` is borrowed for `'static`
45 LL | }
46    | - `x` dropped here while still borrowed
47
48 error: aborting due to 4 previous errors
49
50 For more information about this error, try `rustc --explain E0597`.