]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/where-clauses/where-clauses-method.rs
2 // Test that a where clause attached to a method allows us to add
3 // additional constraints to a parameter out of scope.
10 fn equals(&self, u
: &Foo
<T
>) -> bool
where T
: Eq
{
16 let x
= Foo { value: 1 }
;
17 let y
= Foo { value: 2 }
;
18 println
!("{}", x
.equals(&x
));
19 println
!("{}", x
.equals(&y
));