1 2 3 4 5 6 7 8 9 10 11
trait Foo { fn foo(&self); } trait Bar {} fn do_stuff<T : Bar>(t : T) { t.foo() //~ ERROR no method named `foo` found } fn main() {}