1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // Test syntax checks for `?Sized` syntax.
13 // pretty-expanded FIXME #23616
15 use std::marker::{PhantomData, PhantomFn};
17 trait T1 : PhantomFn<Self> { }
18 pub trait T2 : PhantomFn<Self> { }
19 trait T3<X: T1> : T2 + PhantomFn<X> { }
20 trait T4<X: ?Sized> : PhantomFn<(Self,X)> {}
21 trait T5<X: ?Sized, Y> : PhantomFn<(Self,X,Y)> {}
22 trait T6<Y, X: ?Sized> : PhantomFn<(Self,X,Y)> {}
23 trait T7<X: ?Sized, Y: ?Sized> : PhantomFn<(Self,X,Y)> {}
24 trait T8<X: ?Sized+T2> : PhantomFn<(Self,X)> {}
25 trait T9<X: T2 + ?Sized> : PhantomFn<(Self,X)> {}
26 struct S1<X: ?Sized>(PhantomData<X>);
27 enum E<X: ?Sized> { E1(PhantomData<X>) }
28 impl <X: ?Sized> T1 for S1<X> {}
30 type TT<T: ?Sized> = T;