Skip to content

Commit 28ce23f

Browse files
committed
simplify and avoid allocation
1 parent c29a98e commit 28ce23f

File tree

1 file changed

+2
-2
lines changed
  • src/libsyntax/parse/lexer

1 file changed

+2
-2
lines changed

src/libsyntax/parse/lexer/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1418,8 +1418,8 @@ impl<'a> StringReader<'a> {
14181418
// Include the leading `'` in the real identifier, for macro
14191419
// expansion purposes. See #12512 for the gory details of why
14201420
// this is necessary.
1421-
let ident = self.with_str_from(start, |lifetime_name| {
1422-
self.mk_ident(&format!("'{}", lifetime_name))
1421+
let ident = self.with_str_from(start_with_quote, |lifetime_name| {
1422+
self.mk_ident(lifetime_name)
14231423
});
14241424

14251425
if c2.is_numeric() {

0 commit comments

Comments
 (0)