]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0053.md
Auto merge of #66396 - smmalis37:pythontest, r=alexcrichton
[rust.git] / src / librustc_error_codes / error_codes / E0053.md
1 The parameters of any trait method must match between a trait implementation
2 and the trait definition.
3
4 Erroneous code example:
5
6 ```compile_fail,E0053
7 trait Foo {
8     fn foo(x: u16);
9     fn bar(&self);
10 }
11
12 struct Bar;
13
14 impl Foo for Bar {
15     // error, expected u16, found i16
16     fn foo(x: i16) { }
17
18     // error, types differ in mutability
19     fn bar(&mut self) { }
20 }
21 ```