};
let mut_var_suggestion = 'block: {
- if !matches!(mutbl, ast::Mutability::Mut) {
+ if mutbl.is_not() {
break 'block None;
}
format!("to take parameter `{binding}` by reference, move `&{mutability}` to the type"),
vec![
(pat.span.until(inner.span), "".to_owned()),
- (ty_span.shrink_to_lo(), format!("&{}", mutbl.prefix_str())),
+ (ty_span.shrink_to_lo(), mutbl.ref_prefix_str().to_owned()),
],
Applicability::MachineApplicable
);