fix wrong replacing

This commit is contained in:
csmoe 2018-05-31 22:31:13 +08:00 committed by ashtneoi
parent 77d5f39771
commit 246caea009
1 changed files with 1 additions and 1 deletions

View File

@ -1214,7 +1214,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
db.span_label(
let_span,
format!("consider changing this to `{}`",
snippet.replace("ref ", "ref mut "))
snippet.replacen("ref ", "ref mut ", 1))
);
}
}