Skip to content
Permalink
Browse files

Fix invalid bounding box

  • Loading branch information
estebank committed Jan 10, 2020
1 parent 3250057 commit d558f6a570a782cd1c2e54de790f4f968b0de5f1
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/librustc_errors/lib.rs
@@ -182,7 +182,7 @@ impl CodeSuggestion {

// Find the bounding span.
let lo = substitution.parts.iter().map(|part| part.span.lo()).min().unwrap();
let hi = substitution.parts.iter().map(|part| part.span.hi()).min().unwrap();
let hi = substitution.parts.iter().map(|part| part.span.hi()).max().unwrap();
let bounding_span = Span::with_root_ctxt(lo, hi);
let lines = cm.span_to_lines(bounding_span).unwrap();
assert!(!lines.lines.is_empty());

0 comments on commit d558f6a

Please sign in to comment.
You can’t perform that action at this time.