diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-06-16 19:39:39 +0400 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-06-16 19:54:42 +0400 |
| commit | c1a2db3372a4d6896744919284f3287650a38ab7 (patch) | |
| tree | 636b2ff560a6dc628c5cec1440db82210b73dee5 /compiler/rustc_feature/src | |
| parent | 7c360dc117d554a11f7193505da0835c4b890c6f (diff) | |
| download | rust-c1a2db3372a4d6896744919284f3287650a38ab7.tar.gz rust-c1a2db3372a4d6896744919284f3287650a38ab7.zip | |
Move/rename `lazy::Sync{OnceCell,Lazy}` to `sync::{Once,Lazy}Lock`
Diffstat (limited to 'compiler/rustc_feature/src')
| -rw-r--r-- | compiler/rustc_feature/src/builtin_attrs.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index d4452a79dfb..6fcdfe44d8f 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -9,7 +9,7 @@ use crate::{Features, Stability}; use rustc_data_structures::fx::FxHashMap; use rustc_span::symbol::{sym, Symbol}; -use std::lazy::SyncLazy; +use std::sync::LazyLock; type GateFn = fn(&Features) -> bool; @@ -809,8 +809,8 @@ pub fn is_builtin_only_local(name: Symbol) -> bool { BUILTIN_ATTRIBUTE_MAP.get(&name).map_or(false, |attr| attr.only_local) } -pub static BUILTIN_ATTRIBUTE_MAP: SyncLazy<FxHashMap<Symbol, &BuiltinAttribute>> = - SyncLazy::new(|| { +pub static BUILTIN_ATTRIBUTE_MAP: LazyLock<FxHashMap<Symbol, &BuiltinAttribute>> = + LazyLock::new(|| { let mut map = FxHashMap::default(); for attr in BUILTIN_ATTRIBUTES.iter() { if map.insert(attr.name, attr).is_some() { |
