We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3250057 commit d558f6aCopy full SHA for d558f6a
src/librustc_errors/lib.rs
@@ -182,7 +182,7 @@ impl CodeSuggestion {
182
183
// Find the bounding span.
184
let lo = substitution.parts.iter().map(|part| part.span.lo()).min().unwrap();
185
- let hi = substitution.parts.iter().map(|part| part.span.hi()).min().unwrap();
+ let hi = substitution.parts.iter().map(|part| part.span.hi()).max().unwrap();
186
let bounding_span = Span::with_root_ctxt(lo, hi);
187
let lines = cm.span_to_lines(bounding_span).unwrap();
188
assert!(!lines.lines.is_empty());
0 commit comments