We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given
trait Foo { fn bar(&mut self, other: &mut Foo); } struct Baz; impl Foo for Baz { fn bar(&mut self, other: &Foo) {} }
the current output is
error[E0053]: method `bar` has an incompatible type for trait --> $DIR/issue-13033.rs:18:30 | LL | fn bar(&mut self, other: &mut Foo); | -------- type in trait ... LL | fn bar(&mut self, other: &Foo) {} | ^^^^ types differ in mutability | = note: expected type `fn(&mut Baz, &mut dyn Foo)` found type `fn(&mut Baz, &dyn Foo)`
It should suggest to change the impl method signature to match the trait.
The text was updated successfully, but these errors were encountered:
compile-fail
ui
Rollup merge of rust-lang#52702 - csmoe:mut_diff, r=estebank
15bc3ef
Suggest fix when encountering different mutability from impl to trait Closes rust-lang#52412 r? @estebank
80c798b
csmoe
No branches or pull requests
Given
the current output is
It should suggest to change the impl method signature to match the trait.
The text was updated successfully, but these errors were encountered: