rust/tests/ui/error-codes/E0229.rs
2023-01-11 09:32:08 +00:00

18 lines
280 B
Rust

pub trait Foo {
type A;
fn boo(&self) -> <Self as Foo>::A;
}
struct Bar;
impl Foo for isize {
type A = usize;
fn boo(&self) -> usize { 42 }
}
fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
//~^ ERROR associated type bindings are not allowed here [E0229]
fn main() {
}