// run-pass // compile-flags: -Z chalk trait Eq { } trait Hash: Eq { } impl Eq for i32 { } impl Hash for i32 { } struct Set { _x: T, } fn only_eq() { } fn take_a_set(_: &Set) { // `Set` is an input type of `take_a_set`, hence we know that // `T` must implement `Hash`, and we know in turn that `T` must // implement `Eq`. only_eq::() } fn main() { let set = Set { _x: 5, }; take_a_set(&set); }