From 28ce23fe8bfee55a0810b4347423e66c7621650a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 23 Apr 2019 00:05:06 +0300 Subject: [PATCH] simplify and avoid allocation --- src/libsyntax/parse/lexer/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 61322985b9a5d..cf8f8abe2ab50 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -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() {