rust/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed

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

21 lines
210 B
Rust
Raw Normal View History

// run-rustfix
trait Foo {}
trait Bar {
fn hello(&self) {}
}
struct S;
impl Foo for S {}
impl Bar for S {}
fn test(foo: impl Foo + Bar) {
foo.hello(); //~ ERROR E0599
}
fn main() {
test(S);
}