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