1 // check-pass 2 3 struct Const<const N: usize>; 4 trait Foo<const N: usize> {} 5 6 impl<const N: usize> Foo<N> for Const<N> {} 7 foo_impl(_: impl Foo<3>)8fn foo_impl(_: impl Foo<3>) {} 9 foo_explicit<T: Foo<3>>(_: T)10fn foo_explicit<T: Foo<3>>(_: T) {} 11 foo_where<T>(_: T) where T: Foo<3>,12fn foo_where<T>(_: T) 13 where 14 T: Foo<3>, 15 { 16 } 17 main()18fn main() { 19 foo_impl(Const); 20 foo_impl(Const::<3>); 21 22 foo_explicit(Const); 23 foo_explicit(Const::<3>); 24 25 foo_where(Const); 26 foo_where(Const::<3>); 27 } 28