about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-11-26 00:07:11 +0000
committerMichael Goulet <michael@errs.io>2024-12-01 05:22:16 +0000
commitb87e935407c1d90845e21388ac569d7449e4293a (patch)
treeb4b27ebabe3b1cad6e85628161a44dd5b4239384
parent4af7fa79a0e829c0edcc93434a8c788be8ec58c6 (diff)
downloadrust-b87e935407c1d90845e21388ac569d7449e4293a.tar.gz
rust-b87e935407c1d90845e21388ac569d7449e4293a.zip
Revert "Reject raw lifetime followed by \' as well"
This reverts commit 1990f1560801ca3f9e6a3286e58204aa329ee037.
-rw-r--r--compiler/rustc_lexer/src/lib.rs12
1 files changed, 1 insertions, 11 deletions
diff --git a/compiler/rustc_lexer/src/lib.rs b/compiler/rustc_lexer/src/lib.rs
index b584e7afd98..6caeec1b5cc 100644
--- a/compiler/rustc_lexer/src/lib.rs
+++ b/compiler/rustc_lexer/src/lib.rs
@@ -707,17 +707,7 @@ impl Cursor<'_> {
             self.bump();
             self.bump();
             self.eat_while(is_id_continue);
-            match self.first() {
-                '\'' => {
-                    // Check if after skipping literal contents we've met a closing
-                    // single quote (which means that user attempted to create a
-                    // string with single quotes).
-                    self.bump();
-                    let kind = Char { terminated: true };
-                    return Literal { kind, suffix_start: self.pos_within_token() };
-                }
-                _ => return RawLifetime,
-            }
+            return RawLifetime;
         }
 
         // Either a lifetime or a character literal with