Skip to content

Commit 3833e60

Browse files
committed
fix wrong replacing
1 parent cd11054 commit 3833e60

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
@@ -1201,7 +1201,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
12011201
db.span_label(
12021202
let_span,
12031203
format!("consider changing this to `{}`",
1204-
snippet.replace("ref ", "ref mut "))
1204+
snippet.replacen("ref ", "ref mut ", 1))
12051205
);
12061206
}
12071207
}

0 commit comments

Comments
 (0)