]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / impl-trait-with-missing-trait-bounds-in-arg.fixed
1 // run-rustfix
2
3 trait Foo {}
4
5 trait Bar {
6     fn hello(&self) {}
7 }
8
9 struct S;
10
11 impl Foo for S {}
12 impl Bar for S {}
13
14 fn test(foo: impl Foo + Bar) {
15     foo.hello(); //~ ERROR E0599
16 }
17
18 fn main() {
19     test(S);
20 }