]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0053.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / 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 ```