1
Fork 0

Revert "Reject raw lifetime followed by \' as well"

This reverts commit 1990f15608.
This commit is contained in:
Michael Goulet 2024-11-26 00:07:11 +00:00
parent 4af7fa79a0
commit b87e935407

View file

@ -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