parser: self.span
-> self.token.span
This commit is contained in:
parent
ca1bcfdde3
commit
3da094319c
13 changed files with 255 additions and 242 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue