Skip to content

Commit 246caea

Browse files
csmoeashtneoi
authored andcommitted
fix wrong replacing
1 parent 77d5f39 commit 246caea

File tree

1 file changed

+1
-1
lines changed
  • src/librustc_borrowck/borrowck

1 file changed

+1
-1
lines changed

src/librustc_borrowck/borrowck/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
12141214
db.span_label(
12151215
let_span,
12161216
format!("consider changing this to `{}`",
1217-
snippet.replace("ref ", "ref mut "))
1217+
snippet.replacen("ref ", "ref mut ", 1))
12181218
);
12191219
}
12201220
}

0 commit comments

Comments
 (0)