error[E0308]: mismatched types --> $DIR/option_mut_coerce_shared.rs:5:12 | LL | method(a); | ------ ^ types differ in mutability | | | arguments to this function are incorrect | = note: expected enum `Option<&()>` found enum `Option<&mut ()>` note: function defined here --> $DIR/option_mut_coerce_shared.rs:1:4 | LL | fn method(a: Option<&()>) {} | ^^^^^^ -------------- help: try using `.as_deref()` to convert `Option<&mut ()>` to `Option<&()>` | LL | method(a.as_deref()); | +++++++++++ error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`.