fork/rust

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

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

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