fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
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 | let x: &'static [T] = &[]; 8 | - binding `x` declared here 9LL | &x 10 | ^^ 11 | | 12 | borrowed value does not live long enough 13 | using this value as a constant requires that `x` is borrowed for `'a` 14LL | 15LL | }; 16 | - `x` dropped here while still borrowed 17 18error[E0597]: `x` does not live long enough 19 --> $DIR/generic-slice.rs:27:5 20 | 21LL | let x: &[_] = &[]; 22 | - binding `x` declared here 23LL | &x 24 | ^^ 25 | | 26 | borrowed value does not live long enough 27 | using this value as a static requires that `x` is borrowed for `'static` 28LL | 29LL | }; 30 | - `x` dropped here while still borrowed 31 32error: aborting due to 2 previous errors 33 34For more information about this error, try `rustc --explain E0597`.