1 // Several variants of #64945.
3 // This struct is not important, we just use it to put `T` and `'a` in scope for our associated
5 struct Generic<'a, T>(std::marker::PhantomData<&'a T>);
7 impl<'a, T: 'static> Generic<'a, T> {
8 const EMPTY_SLICE: &'a [T] = {
13 const EMPTY_SLICE_REF: &'a &'static [T] = {
14 let x: &'static [T] = &[];
16 //~^ ERROR `x` does not live long enough
20 static mut INTERIOR_MUT_AND_DROP: &'static [std::cell::RefCell<Vec<i32>>] = {
25 static mut INTERIOR_MUT_AND_DROP_REF: &'static &'static [std::cell::RefCell<Vec<i32>>] = {
28 //~^ ERROR `x` does not live long enough