]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/bound/impl-comparison-duplicates.rs
Merge commit '0969bc6dde001e01e7e1f58c8ccd7750f8a49ae1' into sync_cg_clif-2021-03-29
[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() {}