error[E0596]: cannot borrow immutable argument `arg` as mutable --> $DIR/mut-suggestion.rs:12:5 | LL | fn func(arg: S) { | --- help: make this binding mutable: `mut arg` ... LL | arg.mutate(); | ^^^ cannot borrow mutably error[E0596]: cannot borrow immutable local variable `local` as mutable --> $DIR/mut-suggestion.rs:21:5 | LL | let local = S; | ----- help: make this binding mutable: `mut local` ... LL | local.mutate(); | ^^^^^ cannot borrow mutably error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0596`.