blob: 99424836ece2f3e22a9ecb5d0040c69d5e1219c8 [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::bar();
//~^ ERROR type annotations required
}