rust/tests/ui/error-codes/E0229.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
280 B
Rust
Raw Normal View History

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