]>
Commit | Line | Data |
---|---|---|
0731742a XL |
1 | // revisions: old re |
2 | ||
3 | #![cfg_attr(re, feature(re_rebalance_coherence))] | |
1a4d82fc | 4 | |
c34b1796 | 5 | use std::fmt::Debug; |
1a4d82fc JJ |
6 | use std::default::Default; |
7 | ||
8 | // Test that two blanket impls conflict (at least without negative | |
9 | // bounds). After all, some other crate could implement Even or Odd | |
10 | // for the same type (though this crate doesn't implement them at all). | |
11 | ||
12 | trait MyTrait { | |
13 | fn get(&self) -> usize; | |
14 | } | |
15 | ||
9346a6ac | 16 | trait Even {} |
1a4d82fc | 17 | |
9346a6ac | 18 | trait Odd {} |
1a4d82fc | 19 | |
54a0048b | 20 | impl<T:Even> MyTrait for T { |
1a4d82fc JJ |
21 | fn get(&self) -> usize { 0 } |
22 | } | |
23 | ||
0731742a XL |
24 | impl<T:Odd> MyTrait for T { |
25 | //[old]~^ ERROR E0119 | |
26 | //[re]~^^ ERROR E0119 | |
1a4d82fc JJ |
27 | fn get(&self) -> usize { 0 } |
28 | } | |
29 | ||
30 | fn main() { } |