An example: http://is.gd/GuGCDC
:4:5: 7:4 error: method `add` has an incompatible type for trait: values differ in mutability [E0053]
:4 fn add(&self, _rhs: &mut Foo) -> Foo {
:5 println!("Adding!");
:6 *self
:7 }
A better error might have a span showing just the mut (or the parameter) and a suggested correct signature. Right now I have to go look the trait up, either in the code or the docs.
fn add(&self, _rhs: &mut Foo) -> Foo {
^~~
Note: The correct signature would be
fn add(&self, _rhs: &Foo) -> Foo {
An example: http://is.gd/GuGCDC
A better error might have a span showing just the mut (or the parameter) and a suggested correct signature. Right now I have to go look the trait up, either in the code or the docs.