diff options
| author | bors <bors@rust-lang.org> | 2024-02-25 16:18:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-25 16:18:45 +0000 |
| commit | 8c0b1fcd2914caaf1c3a1071028fb74b70c519e9 (patch) | |
| tree | 2f87a275d744713395351771d943ebea39482a6a /compiler/rustc_parse/src/lexer/mod.rs | |
| parent | 34aab623ddccd54636a9f6e630cb29af443c4680 (diff) | |
| parent | a4423884c15acbe9d3027ddd9d008f79d583afeb (diff) | |
| download | rust-8c0b1fcd2914caaf1c3a1071028fb74b70c519e9.tar.gz rust-8c0b1fcd2914caaf1c3a1071028fb74b70c519e9.zip | |
Auto merge of #121591 - matthiaskrgr:rollup-8wfhh3v, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #119590 (Stabilize `cfg_target_abi`) - #120805 (make non-PartialEq-typed consts as patterns a hard error) - #121060 (Add newtypes for bool fields/params/return types) - #121284 (Add test cases for inlining compiler-private items) - #121324 (pattern_analysis: factor out unspecialization) - #121409 (Prevent cycle in implied predicates computation) - #121513 (Fix sgx unit test compilation) - #121570 (Make most bootstrap step types !Copy) - #121586 (Don't use `unwrap()` in `ArrayIntoIter` lint when typeck fails) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/lexer/mod.rs')
| -rw-r--r-- | compiler/rustc_parse/src/lexer/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_parse/src/lexer/mod.rs b/compiler/rustc_parse/src/lexer/mod.rs index c768ea93b5f..dc9f5bad765 100644 --- a/compiler/rustc_parse/src/lexer/mod.rs +++ b/compiler/rustc_parse/src/lexer/mod.rs @@ -4,7 +4,7 @@ use crate::errors; use crate::lexer::unicode_chars::UNICODE_ARRAY; use crate::make_unclosed_delims_error; use rustc_ast::ast::{self, AttrStyle}; -use rustc_ast::token::{self, CommentKind, Delimiter, Token, TokenKind}; +use rustc_ast::token::{self, CommentKind, Delimiter, IdentIsRaw, Token, TokenKind}; use rustc_ast::tokenstream::TokenStream; use rustc_ast::util::unicode::contains_text_flow_control_chars; use rustc_errors::{codes::*, Applicability, DiagCtxt, DiagnosticBuilder, StashKey}; @@ -181,7 +181,7 @@ impl<'sess, 'src> StringReader<'sess, 'src> { self.dcx().emit_err(errors::CannotBeRawIdent { span, ident: sym }); } self.sess.raw_identifier_spans.push(span); - token::Ident(sym, true) + token::Ident(sym, IdentIsRaw::Yes) } rustc_lexer::TokenKind::UnknownPrefix => { self.report_unknown_prefix(start); @@ -201,7 +201,7 @@ impl<'sess, 'src> StringReader<'sess, 'src> { let span = self.mk_sp(start, self.pos); self.sess.bad_unicode_identifiers.borrow_mut().entry(sym).or_default() .push(span); - token::Ident(sym, false) + token::Ident(sym, IdentIsRaw::No) } // split up (raw) c string literals to an ident and a string literal when edition < 2021. rustc_lexer::TokenKind::Literal { @@ -339,7 +339,7 @@ impl<'sess, 'src> StringReader<'sess, 'src> { let sym = nfc_normalize(self.str_from(start)); let span = self.mk_sp(start, self.pos); self.sess.symbol_gallery.insert(sym, span); - token::Ident(sym, false) + token::Ident(sym, IdentIsRaw::No) } /// Detect usages of Unicode codepoints changing the direction of the text on screen and loudly |
