]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const-eval/generic-slice.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / generic-slice.stderr
1 error[E0597]: `x` does not live long enough
2 --> $DIR/generic-slice.rs:15:9
3 |
4 LL | impl<'a, T: 'static> Generic<'a, T> {
5 | -- lifetime `'a` defined here
6 ...
7 LL | &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`
12 LL |
13 LL | };
14 | - `x` dropped here while still borrowed
15
16 error[E0597]: `x` does not live long enough
17 --> $DIR/generic-slice.rs:27:5
18 |
19 LL | &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`
24 LL |
25 LL | };
26 | - `x` dropped here while still borrowed
27
28 error: aborting due to 2 previous errors
29
30 For more information about this error, try `rustc --explain E0597`.