1 #![feature(generic_const_exprs)]
2 #![allow(incomplete_features)]
8 impl<T> MiniTypeId for T {
9 const TYPE_ID: u64 = 0;
12 enum Lift<const V: bool> {}
15 impl IsFalse for Lift<false> {}
17 const fn is_same_type<T: MiniTypeId, U: MiniTypeId>() -> bool {
18 T::TYPE_ID == U::TYPE_ID
21 fn requires_distinct<A, B>(_a: A, _b: B) where
22 A: MiniTypeId, B: MiniTypeId,
23 Lift<{is_same_type::<A, B>()}>: IsFalse {}
26 requires_distinct("str", 12);
27 //~^ ERROR mismatched types