3 #![cfg_attr(full, feature(const_generics))]
4 #![cfg_attr(full, allow(incomplete_features))]
5 #![cfg_attr(min, feature(min_const_generics))]
8 struct ConstString<const T: &'static str>;
10 struct ConstBytes<const T: &'static [u8]>;
14 let _: ConstString<"Hello"> = ConstString::<"Hello">;
15 let _: ConstString<"Hello"> = ConstString::<"World">; //[full]~ ERROR mismatched types
16 let _: ConstString<"ℇ㇈↦"> = ConstString::<"ℇ㇈↦">;
17 let _: ConstString<"ℇ㇈↦"> = ConstString::<"ℇ㇈↥">; //[full]~ ERROR mismatched types
18 let _: ConstBytes<b"AAA"> = ConstBytes::<{&[0x41, 0x41, 0x41]}>;
19 let _: ConstBytes<b"AAA"> = ConstBytes::<b"BBB">; //[full]~ ERROR mismatched types