2016-08-03 18:51:52 -05:00
|
|
|
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 }
|
|
|
|
}
|
|
|
|
|
2016-08-05 13:11:26 -05:00
|
|
|
fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
|
|
|
|
//~^ ERROR associated type bindings are not allowed here [E0229]
|
2016-08-03 18:51:52 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|