mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 10:05:06 +03:00
Auto merge of #51324 - oli-obk:debug_overflow, r=estebank
Also prevent overflow in debug builds r? @estebank
This commit is contained in:
@@ -1287,7 +1287,7 @@ fn emit_suggestion_default(&mut self,
|
||||
});
|
||||
|
||||
// length of the code to be substituted
|
||||
let snippet_len = (span_end_pos - span_start_pos) as isize;
|
||||
let snippet_len = span_end_pos as isize - span_start_pos as isize;
|
||||
// For multiple substitutions, use the position *after* the previous
|
||||
// substitutions have happened.
|
||||
offset += full_sub_len - snippet_len;
|
||||
|
||||
Reference in New Issue
Block a user