Closed
Description
I tried this code:
#![feature(inherent_associated_types)]
struct Foo<T: ?Sized>(T);
impl<T> Foo<T> {
type Bar = i32;
}
fn main() {
let x: Foo<[u8]>::Bar = 1;
}
I expected to see it fail, since while Foo<[u8]>
is WF, it does not satisfy the where-clauses of the impl
that it's selecting the associated type Bar
from.