blob: 3179811274e8103a19326997dfcf2ca32d78f842 [file] [log] [blame]
// Check that an associated type cannot be bound in an expression path.
trait Foo {
type A;
fn bar() -> isize;
}
impl Foo for isize {
type A = usize;
fn bar() -> isize {
42
}
}
pub fn main() {
let x: isize = Foo::<A = usize>::bar();
//~^ ERROR associated item constraints are not allowed here
}