1 use std::ops::Deref; 2 3 trait PointerFamily<U> { 4 type Pointer<T>: Deref<Target = T>; 5 //~^ ERROR generic associated types are unstable 6 type Pointer2<T>: Deref<Target = T> where T: Clone, U: Clone; 7 //~^ ERROR generic associated types are unstable 8 //~| ERROR where clauses on associated types are unstable 9 } 10 11 struct Foo; 12 13 impl PointerFamily<u32> for Foo { 14 type Pointer<Usize> = Box<Usize>; 15 //~^ ERROR generic associated types are unstable 16 type Pointer2<U32> = Box<U32>; 17 //~^ ERROR generic associated types are unstable 18 //~| ERROR the trait bound `U32: Clone` is not satisfied 19 } 20 21 trait Bar { 22 type Assoc where Self: Sized; 23 //~^ ERROR where clauses on associated types are unstable 24 } 25 26 impl Bar for Foo { 27 type Assoc where Self: Sized = Foo; 28 //~^ ERROR where clauses on associated types are unstable 29 } 30 main()31fn main() {} 32