Skip to content

Commit 0006737

Browse files
committed
Fix the typo error caused span ice
1 parent acda5e9 commit 0006737

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_errors/src/annotate_snippet_emitter_writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ fn shrink_file(
749749

750750
let hi_byte = spans.iter().map(|s| s.hi()).max()?;
751751
let hi_loc = sm.lookup_char_pos(hi_byte);
752-
let hi = lo_loc.file.line_bounds(hi_loc.line.saturating_sub(1)).end;
752+
let hi = hi_loc.file.line_bounds(hi_loc.line.saturating_sub(1)).end;
753753

754754
let bounding_span = Span::with_root_ctxt(lo, hi);
755755
let source = sm.span_to_snippet(bounding_span).unwrap_or_default();

0 commit comments

Comments
 (0)