1 // Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-518402995.
3 #![cfg_attr(full, feature(adt_const_params))]
4 #![cfg_attr(full, allow(incomplete_features))]
7 use std::marker::PhantomData;
9 struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
10 //~^ ERROR: use of non-static lifetime `'a` in const generic
11 //[min]~| ERROR: `&'static str` is forbidden as the type of a const generic parameter