2 #![allow(incomplete_features)]
3 #![feature(adt_const_params)]
4 #![feature(generic_const_exprs)]
5 use std::marker::PhantomData;
7 struct Foo<const I: i32, const J: i32> {}
12 impl<const I: i32> Foo<I, ONE> {
16 impl<const I: i32> Foo<I, TWO> {
21 pub struct Foo2<const P: Protocol, T> {
22 _marker: PhantomData<T>,
25 #[derive(PartialEq, Eq)]
33 impl<T> Bar for Foo2<{ Protocol::Variant1 }, T> {}
34 impl<T> Bar for Foo2<{ Protocol::Variant2 }, T> {}