From 3da094319c705e123e1176553d9c5b5955ff0642 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Fri, 7 Jun 2019 13:31:13 +0300 Subject: parser: `self.span` -> `self.token.span` --- src/libsyntax_ext/assert.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax_ext/assert.rs') diff --git a/src/libsyntax_ext/assert.rs b/src/libsyntax_ext/assert.rs index 3886528c74c..10d323ffb89 100644 --- a/src/libsyntax_ext/assert.rs +++ b/src/libsyntax_ext/assert.rs @@ -85,7 +85,7 @@ fn parse_assert<'a>( if parser.token == token::Semi { let mut err = cx.struct_span_warn(sp, "macro requires an expression as an argument"); err.span_suggestion( - parser.span, + parser.token.span, "try removing semicolon", String::new(), Applicability::MaybeIncorrect @@ -105,7 +105,7 @@ fn parse_assert<'a>( // turned into an error. let custom_message = if let token::Literal(token::Lit { kind: token::Str, .. }) = parser.token.kind { - let mut err = cx.struct_span_warn(parser.span, "unexpected string literal"); + let mut err = cx.struct_span_warn(parser.token.span, "unexpected string literal"); let comma_span = cx.source_map().next_point(parser.prev_span); err.span_suggestion_short( comma_span, -- cgit 1.4.1-3-g733a5