about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-28 07:44:14 +0000
committerbors <bors@rust-lang.org>2018-01-28 07:44:14 +0000
commit7046a406232695b581579f8e2468601260ea2199 (patch)
treeb6c17a098f2035b5ed43d3f7040b8c9047cc8349 /src/libsyntax/parse
parent87990a119aa1ce77f294253cde836518870b8032 (diff)
parent445e404ba4c9782e4f5028eccb7c9473ae33c70a (diff)
downloadrust-7046a406232695b581579f8e2468601260ea2199.tar.gz
rust-7046a406232695b581579f8e2468601260ea2199.zip
Auto merge of #47767 - estebank:as-suggestion, r=petrochenkov
Correctly format `extern crate` conflict resolution help

Closes #45799. Follow up to @Cldfire's #45820.

If the `extern` statement that will have a suggestion ends on a `;`, synthesize a new span that doesn't include it.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index e8e87e2854b..a3de31cc2ea 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -6115,6 +6115,7 @@ impl<'a> Parser<'a> {
         self.expect(&token::Semi)?;
 
         let prev_span = self.prev_span;
+
         Ok(self.mk_item(lo.to(prev_span),
                         ident,
                         ItemKind::ExternCrate(maybe_path),