]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/bound/impl-comparison-duplicates.rs
Sync rust-lang/portable-simd@03f6fbb21e6050da2a05b3ce8f480c020b384916
[rust.git] / src / test / ui / traits / bound / impl-comparison-duplicates.rs
1 // run-pass
2 // Tests that type parameter bounds on an implementation need not match the
3 // trait exactly, as long as the implementation doesn't demand *more* bounds
4 // than the trait.
5
6 // pretty-expanded FIXME #23616
7
8 trait A {
9     fn foo<T: Eq + Ord>(&self);
10 }
11
12 impl A for isize {
13     fn foo<T: Ord>(&self) {} // Ord implies Eq, so this is ok.
14 }
15
16 fn main() {}