diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-28 00:29:23 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-11-07 05:25:31 +0100 |
| commit | 1db4d607e7621a7d813743e83125859a47970f79 (patch) | |
| tree | cde776509b2b3fbfb57b2a8bb9c4d33ef3856978 /src/libsyntax/parse/parser/expr.rs | |
| parent | 49def0769c51d182bf6c321eefdcda288e3ad218 (diff) | |
| download | rust-1db4d607e7621a7d813743e83125859a47970f79.tar.gz rust-1db4d607e7621a7d813743e83125859a47970f79.zip | |
parser: allow ABIs from literal macro fragments
Diffstat (limited to 'src/libsyntax/parse/parser/expr.rs')
| -rw-r--r-- | src/libsyntax/parse/parser/expr.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser/expr.rs b/src/libsyntax/parse/parser/expr.rs index 97b1092452a..80ea8f380fb 100644 --- a/src/libsyntax/parse/parser/expr.rs +++ b/src/libsyntax/parse/parser/expr.rs @@ -1116,7 +1116,11 @@ impl<'a> Parser<'a> { Err(self.span_fatal(token.span, &msg)) } Err(err) => { - let (lit, span) = (token.expect_lit(), token.span); + let span = token.span; + let lit = match token.kind { + token::Literal(lit) => lit, + _ => unreachable!(), + }; self.bump(); self.error_literal_from_token(err, lit, span); // Pack possible quotes and prefixes from the original literal into |
