rust/tests/ui/traits/issue-65284-suggest-generic-trait-bound.rs
2023-01-11 09:32:08 +00:00

12 lines
144 B
Rust

trait Foo {
fn foo(&self);
}
trait Bar {}
fn do_stuff<T : Bar>(t : T) {
t.foo() //~ ERROR no method named `foo` found
}
fn main() {}