]> git.proxmox.com Git - rustc.git/blob - src/test/compile-fail/coherence-overlap-messages.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / test / compile-fail / coherence-overlap-messages.rs
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
13 impl<T> Foo for T {}
14 impl<U> Foo for U {} //~ ERROR conflicting implementations of trait `Foo`:
15
16 trait Bar {}
17
18 impl<T> Bar for (T, u8) {}
19 impl<T> Bar for (u8, T) {} //~ ERROR conflicting implementations of trait `Bar` for type `(u8, u8)`:
20
21 trait Baz<T> {}
22
23 impl<T> Baz<u8> for T {}
24 impl<T> Baz<T> for u8 {} //~ ERROR conflicting implementations of trait `Baz<u8>` for type `u8`:
25
26 trait Quux<U, V> {}
27
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<_, _>`:
31
32 fn main() {}