diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-06-14 15:20:54 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-06-14 15:20:54 +1000 |
| commit | a2801625cd1ebc1a6644c3613d28da3638a6ec8a (patch) | |
| tree | db4803fddd349b99d9aae04697b7dc677476d034 | |
| parent | ca122c7ebb3ab50149c9d3d24ddb59c252b32272 (diff) | |
| download | rust-a2801625cd1ebc1a6644c3613d28da3638a6ec8a.tar.gz rust-a2801625cd1ebc1a6644c3613d28da3638a6ec8a.zip | |
Remove thread-local `IGNORED_ATTRIBUTES`.
It's just a copy of the read-only global `ich::IGNORED_ATTRIBUTES`, and can be removed without any effect.
| -rw-r--r-- | compiler/rustc_query_system/src/ich/hcx.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/compiler/rustc_query_system/src/ich/hcx.rs b/compiler/rustc_query_system/src/ich/hcx.rs index 03ef8578eb7..7e36eadd62c 100644 --- a/compiler/rustc_query_system/src/ich/hcx.rs +++ b/compiler/rustc_query_system/src/ich/hcx.rs @@ -1,6 +1,5 @@ use crate::ich; use rustc_ast as ast; -use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::sorted_map::SortedMap; use rustc_data_structures::stable_hasher::{HashStable, HashingControls, StableHasher}; use rustc_data_structures::sync::Lrc; @@ -13,11 +12,6 @@ use rustc_span::source_map::SourceMap; use rustc_span::symbol::Symbol; use rustc_span::{BytePos, CachingSourceMapView, SourceFile, Span, SpanData}; -fn compute_ignored_attr_names() -> FxHashSet<Symbol> { - debug_assert!(!ich::IGNORED_ATTRIBUTES.is_empty()); - ich::IGNORED_ATTRIBUTES.iter().copied().collect() -} - /// This is the context state available during incr. comp. hashing. It contains /// enough information to transform `DefId`s and `HirId`s into stable `DefPath`s (i.e., /// a reference to the `TyCtxt`) and it holds a few caches for speeding up various @@ -161,10 +155,7 @@ impl<'a> StableHashingContext<'a> { #[inline] pub fn is_ignored_attr(&self, name: Symbol) -> bool { - thread_local! { - static IGNORED_ATTRIBUTES: FxHashSet<Symbol> = compute_ignored_attr_names(); - } - IGNORED_ATTRIBUTES.with(|attrs| attrs.contains(&name)) + ich::IGNORED_ATTRIBUTES.contains(&name) } #[inline] |
