2 #![feature(const_generics)]
3 #![allow(incomplete_features)]
9 trait Get<'a, const N: &'static str> {
12 fn get(&'a self) -> &'a Self::Target;
16 fn ask<'a, const N: &'static str>(&'a self) -> &'a <Self as Get<N>>::Target
24 impl<'a> Get<'a, "int"> for Foo {
27 fn get(&'a self) -> &'a Self::Target {
33 let foo = Foo { i: 123 };
34 assert_eq!(foo.ask::<"int">(), &123);