]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/unsized.rs
Update tests to use `?Sized`
[rust.git] / src / test / run-pass / unsized.rs
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.
4 //
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.
10 //
11 // ignore-lexer-test FIXME #15879
12
13 // Test syntax checks for `?Sized` syntax.
14
15 trait T1 for ?Sized {}
16 pub trait T2 for ?Sized {}
17 trait T3<X: T1> for ?Sized: T2 {}
18 trait T4<X: ?Sized> {}
19 trait T5<X: ?Sized, Y> {}
20 trait T6<Y, X: ?Sized> {}
21 trait T7<X: ?Sized, Y: ?Sized> {}
22 trait T8<X: ?Sized+T2> {}
23 trait T9<X: T2 + ?Sized> {}
24 struct S1<X: ?Sized>;
25 enum E<X: ?Sized> {}
26 impl <X: ?Sized> T1 for S1<X> {}
27 fn f<X: ?Sized>() {}
28 type TT<T: ?Sized> = T;
29
30 pub fn main() {
31 }