]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/impl-generic-mismatch-ab.stderr
Rollup merge of #98441 - calebzulawski:simd_as, r=oli-obk
[rust.git] / src / test / ui / impl-trait / impl-generic-mismatch-ab.stderr
1 error[E0053]: method `foo` has an incompatible type for trait
2   --> $DIR/impl-generic-mismatch-ab.rs:8:32
3    |
4 LL |     fn foo<B: Debug>(&self, a: &impl Debug, b: &B) { }
5    |            -                   ^^^^^^^^^^^
6    |            |                   |
7    |            |                   expected type parameter `B`, found type parameter `impl Debug`
8    |            |                   help: change the parameter type to match the trait: `&B`
9    |            expected type parameter
10    |
11 note: type in trait
12   --> $DIR/impl-generic-mismatch-ab.rs:4:32
13    |
14 LL |     fn foo<A: Debug>(&self, a: &A, b: &impl Debug);
15    |                                ^^
16    = note: expected fn pointer `fn(&(), &B, &impl Debug)`
17               found fn pointer `fn(&(), &impl Debug, &B)`
18    = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
19    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0053`.