mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
21 lines
210 B
Rust
21 lines
210 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 + Bar) {
|
|
foo.hello(); //~ ERROR E0599
|
|
}
|
|
|
|
fn main() {
|
|
test(S);
|
|
}
|