]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0185.md
Rollup merge of #62514 - stephaneyfx:box-ffi, r=nikomatsakis
[rust.git] / src / librustc_error_codes / error_codes / E0185.md
1 An associated function for a trait was defined to be static, but an
2 implementation of the trait declared the same function to be a method (i.e., to
3 take a `self` parameter).
4
5 Here's an example of this error:
6
7 ```compile_fail,E0185
8 trait Foo {
9     fn foo();
10 }
11
12 struct Bar;
13
14 impl Foo for Bar {
15     // error, method `foo` has a `&self` declaration in the impl, but not in
16     // the trait
17     fn foo(&self) {}
18 }
19 ```