]>
Commit | Line | Data |
---|---|---|
9cc50fc6 SL |
1 | // Copyright 2015 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 | trait Foo {} | |
12 | ||
54a0048b SL |
13 | impl<T> Foo for T {} |
14 | impl<U> Foo for U {} //~ ERROR conflicting implementations of trait `Foo`: | |
9cc50fc6 SL |
15 | |
16 | trait Bar {} | |
17 | ||
54a0048b SL |
18 | impl<T> Bar for (T, u8) {} |
19 | impl<T> Bar for (u8, T) {} //~ ERROR conflicting implementations of trait `Bar` for type `(u8, u8)`: | |
9cc50fc6 SL |
20 | |
21 | trait Baz<T> {} | |
22 | ||
54a0048b SL |
23 | impl<T> Baz<u8> for T {} |
24 | impl<T> Baz<T> for u8 {} //~ ERROR conflicting implementations of trait `Baz<u8>` for type `u8`: | |
9cc50fc6 | 25 | |
54a0048b | 26 | trait Quux<U, V> {} |
9cc50fc6 | 27 | |
54a0048b SL |
28 | impl<T, U, V> Quux<U, V> for T {} |
29 | impl<T, U> Quux<U, U> for T {} //~ ERROR conflicting implementations of trait `Quux<_, _>`: | |
30 | impl<T, V> Quux<T, V> for T {} //~ ERROR conflicting implementations of trait `Quux<_, _>`: | |
9cc50fc6 SL |
31 | |
32 | fn main() {} |