#![feature(associated_const_equality)] #![allow(unused)] pub trait Foo { const N: usize; } pub struct Bar; impl Foo for Bar { const N: usize = 3; } fn foo1>() {} //~^ ERROR associated constant `Z` not found for `Foo` fn foo2>() {} //~^ ERROR associated type `Z` not found for `Foo` fn foo3>() {} //~^ ERROR associated constant `Z` not found for `Foo` fn main() { foo1::(); foo2::(); foo3::(); }