Skip to content

Commit

Permalink
simplify and avoid allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Apr 22, 2019
1 parent c29a98e commit 28ce23f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libsyntax/parse/lexer/mod.rs
Expand Up @@ -1418,8 +1418,8 @@ impl<'a> StringReader<'a> {
// Include the leading `'` in the real identifier, for macro
// expansion purposes. See #12512 for the gory details of why
// this is necessary.
let ident = self.with_str_from(start, |lifetime_name| {
self.mk_ident(&format!("'{}", lifetime_name))
let ident = self.with_str_from(start_with_quote, |lifetime_name| {
self.mk_ident(lifetime_name)
});

if c2.is_numeric() {
Expand Down

0 comments on commit 28ce23f

Please sign in to comment.