]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/E0053.stderr
Auto merge of #84112 - Dylan-DPC:rollup-tapsrzz, r=Dylan-DPC
[rust.git] / src / test / ui / mismatched_types / E0053.stderr
1 error[E0053]: method `foo` has an incompatible type for trait
2   --> $DIR/E0053.rs:9:15
3    |
4 LL |     fn foo(x: u16);
5    |               --- type in trait
6 ...
7 LL |     fn foo(x: i16) { }
8    |               ^^^
9    |               |
10    |               expected `u16`, found `i16`
11    |               help: change the parameter type to match the trait: `u16`
12    |
13    = note: expected fn pointer `fn(u16)`
14               found fn pointer `fn(i16)`
15
16 error[E0053]: method `bar` has an incompatible type for trait
17   --> $DIR/E0053.rs:11:12
18    |
19 LL |     fn bar(&self);
20    |            ----- type in trait
21 ...
22 LL |     fn bar(&mut self) { }
23    |            ^^^^^^^^^
24    |            |
25    |            types differ in mutability
26    |            help: change the self-receiver type to match the trait: `self: &Bar`
27    |
28    = note: expected fn pointer `fn(&Bar)`
29               found fn pointer `fn(&mut Bar)`
30
31 error: aborting due to 2 previous errors
32
33 For more information about this error, try `rustc --explain E0053`.