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
838 B30 linesraw
1error[E0597]: `x` does not live long enough
2  --> $DIR/generic-slice.rs:15:9
3   |
4LL | impl<'a, T: 'static> Generic<'a, T> {
5   |      -- lifetime `'a` defined here
6...
7LL |         &x
8   |         ^^
9   |         |
10   |         borrowed value does not live long enough
11   |         using this value as a constant requires that `x` is borrowed for `'a`
12LL |
13LL |     };
14   |     - `x` dropped here while still borrowed
15
16error[E0597]: `x` does not live long enough
17  --> $DIR/generic-slice.rs:27:5
18   |
19LL |     &x
20   |     ^^
21   |     |
22   |     borrowed value does not live long enough
23   |     using this value as a static requires that `x` is borrowed for `'static`
24LL |
25LL | };
26   | - `x` dropped here while still borrowed
27
28error: aborting due to 2 previous errors
29
30For more information about this error, try `rustc --explain E0597`.