]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/bound/impl-comparison-duplicates.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / traits / bound / impl-comparison-duplicates.rs
CommitLineData
b7449926 1// run-pass
1a4d82fc
JJ
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.
223e47cc 5
c34b1796
AL
6// pretty-expanded FIXME #23616
7
1a4d82fc
JJ
8trait A {
9 fn foo<T: Eq + Ord>(&self);
223e47cc
LB
10}
11
c34b1796 12impl A for isize {
1a4d82fc 13 fn foo<T: Ord>(&self) {} // Ord implies Eq, so this is ok.
223e47cc
LB
14}
15
16fn main() {}