diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-11-12 14:38:44 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-11-12 15:16:03 +1100 |
| commit | c6862992d947331cd6556f765f6efbde0a709cf9 (patch) | |
| tree | a7a97a17e206359789ba630882235c1c4d2764a5 /src/libsyntax/parse/parser.rs | |
| parent | 5a2ca1a6f18aa93d3120761f614ec2d39b4cb1ac (diff) | |
| download | rust-c6862992d947331cd6556f765f6efbde0a709cf9.tar.gz rust-c6862992d947331cd6556f765f6efbde0a709cf9.zip | |
Change `Lit::short_name` to `Lit::literal_name`.
This avoids a moderately hot allocation in `parse_lit_token`.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 68e7e40c43e..d90ec4ea081 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1956,7 +1956,7 @@ impl<'a> Parser<'a> { if suffix_illegal { let sp = self.span; - self.expect_no_suffix(sp, &format!("{} literal", lit.short_name()), suf) + self.expect_no_suffix(sp, lit.literal_name(), suf) } result.unwrap() |
