about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2019-04-23 00:05:06 +0300
committerAleksey Kladov <aleksey.kladov@gmail.com>2019-04-23 00:05:06 +0300
commit28ce23fe8bfee55a0810b4347423e66c7621650a (patch)
tree12342a03bae38e3e02d7cd58be95614363cff862 /src/libsyntax
parentc29a98e40d825c7f0f6a1d9013747266e835d0be (diff)
downloadrust-28ce23fe8bfee55a0810b4347423e66c7621650a.tar.gz
rust-28ce23fe8bfee55a0810b4347423e66c7621650a.zip
simplify and avoid allocation
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index 61322985b9a..cf8f8abe2ab 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() {