make it semantic error
This commit is contained in:
parent
bf3ca5979e
commit
abb181dfd9
7 changed files with 22 additions and 1 deletions
|
@ -204,6 +204,9 @@ impl<'a> StringReader<'a> {
|
|||
rustc_lexer::TokenKind::Literal { kind, suffix_start } => {
|
||||
let suffix_start = start + BytePos(suffix_start);
|
||||
let (kind, symbol) = self.cook_lexer_literal(start, suffix_start, kind);
|
||||
if let token::LitKind::CStr | token::LitKind::CStrRaw(_) = kind {
|
||||
self.sess.gated_spans.gate(sym::c_str_literals, self.mk_sp(start, self.pos));
|
||||
}
|
||||
let suffix = if suffix_start < self.pos {
|
||||
let string = self.str_from(suffix_start);
|
||||
if string == "_" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue