]>
Commit | Line | Data |
---|---|---|
1a4d82fc JJ |
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 | ||
9346a6ac | 11 | trait Trait {} |
1a4d82fc JJ |
12 | |
13 | struct Foo<T:Trait> { | |
14 | x: T, | |
15 | } | |
16 | ||
17 | enum Bar<T:Trait> { | |
18 | ABar(isize), | |
19 | BBar(T), | |
20 | CBar(usize), | |
21 | } | |
22 | ||
23 | fn explode(x: Foo<u32>) {} | |
24 | //~^ ERROR not implemented | |
25 | ||
26 | fn kaboom(y: Bar<f32>) {} | |
27 | //~^ ERROR not implemented | |
28 | ||
29 | impl<T> Foo<T> { | |
30 | //~^ ERROR the trait `Trait` is not implemented | |
31 | fn uhoh() {} | |
32 | } | |
33 | ||
34 | struct Baz { | |
62682a34 | 35 | a: Foo<isize>, //~ ERROR not implemented |
1a4d82fc JJ |
36 | } |
37 | ||
38 | enum Boo { | |
62682a34 | 39 | Quux(Bar<usize>), //~ ERROR not implemented |
1a4d82fc JJ |
40 | } |
41 | ||
42 | struct Badness<U> { | |
62682a34 | 43 | b: Foo<U>, //~ ERROR not implemented |
1a4d82fc JJ |
44 | } |
45 | ||
46 | enum MoreBadness<V> { | |
62682a34 SL |
47 | EvenMoreBadness(Bar<V>), //~ ERROR not implemented |
48 | } | |
49 | ||
50 | struct TupleLike( | |
51 | Foo<i32>, //~ ERROR not implemented | |
52 | ); | |
53 | ||
54 | enum Enum { | |
55 | DictionaryLike { field: Bar<u8> }, //~ ERROR not implemented | |
1a4d82fc JJ |
56 | } |
57 | ||
85aaf69f SL |
58 | trait PolyTrait<T> |
59 | { | |
60 | fn whatever(&self, t: T) {} | |
1a4d82fc JJ |
61 | } |
62 | ||
63 | struct Struct; | |
64 | ||
62682a34 | 65 | impl PolyTrait<Foo<u16>> for Struct { |
1a4d82fc | 66 | //~^ ERROR not implemented |
1a4d82fc JJ |
67 | } |
68 | ||
69 | fn main() { | |
70 | } |