3 #![cfg_attr(full, feature(adt_const_params))]
4 #![cfg_attr(full, allow(incomplete_features))]
10 trait Get<'a, const N: &'static str> {
11 //[min]~^ ERROR `&'static str` is forbidden as the type of a const generic parameter
14 fn get(&'a self) -> &'a Self::Target;
18 fn ask<'a, const N: &'static str>(&'a self) -> &'a <Self as Get<N>>::Target
19 //[min]~^ ERROR `&'static str` is forbidden as the type of a const generic parameter
27 impl<'a> Get<'a, "int"> for Foo {
30 fn get(&'a self) -> &'a Self::Target {
36 let foo = Foo { i: 123 };
37 assert_eq!(foo.ask::<"int">(), &123);