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