We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87a1b38 commit d2608dfCopy full SHA for d2608df
compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
@@ -1268,9 +1268,9 @@ fn suggest_ampmut<'tcx>(
1268
// shrink the span to just after the `&` in `&variable`
1269
let span = span.with_lo(span.lo() + BytePos(1)).shrink_to_lo();
1270
(true, span, "mut ".to_owned())
1271
- // otherwise, suggest that the user annotates the binding; we provide the
1272
- // type of the local.
1273
} else {
+ // otherwise, suggest that the user annotates the binding; we provide the
+ // type of the local.
1274
let ty_mut = local_decl.ty.builtin_deref(true).unwrap();
1275
assert_eq!(ty_mut.mutbl, hir::Mutability::Not);
1276
0 commit comments