mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
22 lines
516 B
Rust
22 lines
516 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]
|
|
//~| ERROR associated type bindings are not allowed here [E0229]
|
|
//~| ERROR associated type bindings are not allowed here [E0229]
|
|
//~| ERROR the trait bound `I: Foo` is not satisfied
|
|
//~| ERROR the trait bound `I: Foo` is not satisfied
|
|
|
|
fn main() {
|
|
}
|