diff options
| author | bors <bors@rust-lang.org> | 2025-04-01 04:15:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-04-01 04:15:11 +0000 |
| commit | 97ea17b71aba0badfe9c8295f57a434bf79bdb72 (patch) | |
| tree | e9de29036fb6d844f0eb840be323a23b59543435 /compiler/rustc_span/src | |
| parent | 0b45675cfcec57f30a3794e1a1e18423aa9cf200 (diff) | |
| parent | d492348ec8623e0ea6379f094dac969543a6f374 (diff) | |
| download | rust-97ea17b71aba0badfe9c8295f57a434bf79bdb72.tar.gz rust-97ea17b71aba0badfe9c8295f57a434bf79bdb72.zip | |
Auto merge of #139194 - matthiaskrgr:rollup-2mhep38, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #138426 (Fix `armv7-sony-vita-newlibeabihf` LLVM target triple) - #138840 (rustc_resolve: Test the order that preludes are resolved) - #139039 (Reduce kw::Empty usage, part 4) - #139151 (tidy: properly check for orphaned unstable_book pages) - #139176 (Remove fragile equal-pointers-unequal/*/print3.rs tests.) - #139179 (Remove me from vacation) - #139181 (Fix invalid link in docs) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_span/src')
| -rw-r--r-- | compiler/rustc_span/src/hygiene.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/compiler/rustc_span/src/hygiene.rs b/compiler/rustc_span/src/hygiene.rs index e7a8dee27f5..9959e98e3dd 100644 --- a/compiler/rustc_span/src/hygiene.rs +++ b/compiler/rustc_span/src/hygiene.rs @@ -1440,7 +1440,8 @@ pub fn decode_syntax_context<D: Decoder, F: FnOnce(&mut D, u32) -> SyntaxContext } } Entry::Vacant(entry) => { - // We are the first thread to start decoding. Mark the current thread as being progress. + // We are the first thread to start decoding. Mark the current thread as being + // progress. context.local_in_progress.borrow_mut().insert(raw_id); // Allocate and store SyntaxContext id *before* calling the decoder function, diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 47dd80c432e..c6e570e524f 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -131,7 +131,7 @@ symbols! { // tidy-alphabetical-end // Weak keywords, have special meaning only in specific contexts. - // Matching predicates: none + // Matching predicates: `is_weak` // tidy-alphabetical-start Auto: "auto", Builtin: "builtin", @@ -2725,6 +2725,10 @@ impl Symbol { || self.is_unused_keyword_conditional(edition) } + pub fn is_weak(self) -> bool { + self >= kw::Auto && self <= kw::Yeet + } + /// A keyword or reserved identifier that can be used as a path segment. pub fn is_path_segment_keyword(self) -> bool { self == kw::Super |
