#![feature(associated_const_equality)] #![allow(unused)] pub trait Foo { const N: usize; } pub trait FooTy { type T; } pub struct Bar; impl Foo for Bar { const N: usize = 3; } impl FooTy for Bar { type T = usize; } fn foo>() {} //~^ ERROR expected constant, found type fn foo2>() {} //~^ ERROR expected type, found constant fn main() { foo::(); foo2::(); }