]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-blanket-conflicts-with-specific.rs
Auto merge of #2698 - RalfJung:miri-in-rustc, r=oli-obk
[rust.git] / src / test / ui / coherence / coherence-blanket-conflicts-with-specific.rs
1 use std::fmt::Debug;
2 use std::default::Default;
3
4 // Test that a blank impl for all T conflicts with an impl for some
5 // specific T.
6
7 trait MyTrait {
8     fn get(&self) -> usize;
9 }
10
11 impl<T> MyTrait for T {
12     fn get(&self) -> usize { 0 }
13 }
14
15 struct MyType {
16     dummy: usize
17 }
18
19 impl MyTrait for MyType {
20 //~^ ERROR E0119
21     fn get(&self) -> usize { self.dummy }
22 }
23
24 fn main() { }