about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-10-06 08:05:27 +0000
committerbors <bors@rust-lang.org>2020-10-06 08:05:27 +0000
commit5ded394553296d56bb66e925d7001ab3271979ce (patch)
treef770a439c36866d01c22f34d8e615e096fe3354d /compiler/rustc_parse/src
parenta1dfd2490a6cb456b92e469fa550dc217e20ad6d (diff)
parent552933b79d3927dc8df63389417982513156a5eb (diff)
downloadrust-5ded394553296d56bb66e925d7001ab3271979ce.tar.gz
rust-5ded394553296d56bb66e925d7001ab3271979ce.zip
Auto merge of #77606 - JohnTitor:rollup-7rgahdt, r=JohnTitor
Rollup of 13 pull requests

Successful merges:

 - #76388 (Add a note about the panic behavior of math operations on time objects)
 - #76855 (Revamp rustdoc docs about documentation using `cfg`)
 - #76995 (Reduce boilerplate with the matches! macro)
 - #77228 (Add missing examples for MaybeUninit)
 - #77528 (Avoid unchecked casts in net parser)
 - #77534 (Disallow overriding forbid in same scope)
 - #77555 (Allow anyone to set regression labels)
 - #77558 (Rename bootstrap/defaults/{config.toml.PROFILE => config.PROFILE.toml})
 - #77559 (Fix rustdoc warnings about invalid Rust syntax)
 - #77560 (Fix LitKind's byte buffer to use refcounted slice)
 - #77573 (Hint doc use convert::identity relative link)
 - #77587 (Fix span for unicode escape suggestion.)
 - #77591 (Record `expansion_that_defined` into crate metadata)

Failed merges:

r? `@ghost`
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/lexer/unescape_error_reporting.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs b/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs
index 6f249f491a6..47d317f9188 100644
--- a/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs
+++ b/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs
@@ -181,10 +181,9 @@ pub(crate) fn emit_unescape_error(
 
             if suggestion_len > 0 {
                 suggestion.push('}');
-                let lo = char_span.lo();
-                let hi = lo + BytePos(suggestion_len as u32);
+                let hi = char_span.lo() + BytePos(suggestion_len as u32);
                 diag.span_suggestion(
-                    span.with_lo(lo).with_hi(hi),
+                    span.with_hi(hi),
                     "format of unicode escape sequences uses braces",
                     suggestion,
                     Applicability::MaybeIncorrect,