Files
rust/tests/ui/traits/trait-impl-self-mismatch.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
384 B
Plaintext
Raw Normal View History

2025-05-02 15:53:51 +09:00
error[E0186]: method `bar` has a `&self` declaration in the trait, but not in the impl
--> $DIR/trait-impl-self-mismatch.rs:12:5
|
LL | fn bar(&self) {}
| ------------- `&self` used in trait
...
LL | fn bar() {
| ^^^^^^^^ expected `&self` in impl
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0186`.