]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/bound/impl-comparison-duplicates.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.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() {}