rust/tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.rs
2023-01-11 09:32:08 +00:00

21 lines
204 B
Rust

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