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