]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/impl-trait-with-missing-trait-bounds-in-arg.fixed
Rollup merge of #90420 - GuillaumeGomez:rustdoc-internals-feature, r=camelid
[rust.git] / src / test / 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 }