rust/tests/ui/traits/issue-65284-suggest-generic-trait-bound.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
144 B
Rust
Raw Normal View History

2019-10-10 23:51:36 +00:00
trait Foo {
fn foo(&self);
}
trait Bar {}
fn do_stuff<T : Bar>(t : T) {
t.foo() //~ ERROR no method named `foo` found
2019-10-10 23:51:36 +00:00
}
fn main() {}