diff options
| author | bors <bors@rust-lang.org> | 2020-01-11 03:03:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-11 03:03:42 +0000 |
| commit | 88d1109600660d1acb471e85631e1ea349843fd9 (patch) | |
| tree | f661e1f13a4af426e1884d557299cf0f40319da4 /src/librustc_errors | |
| parent | e6217972644588a3be4fecb85b195f17b0220047 (diff) | |
| parent | 04a340f61f937b24262b517770afd08db783ac69 (diff) | |
| download | rust-88d1109600660d1acb471e85631e1ea349843fd9.tar.gz rust-88d1109600660d1acb471e85631e1ea349843fd9.zip | |
Auto merge of #68115 - Centril:rollup-e2fszdv, r=Centril
Rollup of 8 pull requests Successful merges: - #67666 (make use of pointer::is_null) - #67806 (Extract `rustc_ast_passes`, move gating, & refactor linting) - #68043 (Add some missing timers) - #68074 (Add `llvm-skip-rebuild` flag to `x.py`) - #68079 (Clarify suggestion for E0013) - #68084 (Do not ICE on unicode next point) - #68102 (Inline some conversion methods around OsStr) - #68106 (Fix issue with using `self` module via indirection) Failed merges: r? @ghost
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index 99a6d6f8ec2..e24e8719133 100644 --- a/src/librustc_errors/lib.rs +++ b/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()); |
