diff options
| author | Folkert de Vries <folkert@folkertdev.nl> | 2025-07-10 15:48:41 +0200 |
|---|---|---|
| committer | Folkert de Vries <folkert@folkertdev.nl> | 2025-07-15 20:20:46 +0200 |
| commit | 7ff9bcfd1ea1d03ccbff9e4fcc93298fd54840e5 (patch) | |
| tree | 113b6fa4419d121aa4b4dc94637e6d928d2b5c98 /library/stdarch/crates/stdarch-test/src/lib.rs | |
| parent | 5cb1e01a94a51b0ad9d67e913c866fef4f78df14 (diff) | |
| download | rust-7ff9bcfd1ea1d03ccbff9e4fcc93298fd54840e5.tar.gz rust-7ff9bcfd1ea1d03ccbff9e4fcc93298fd54840e5.zip | |
`stdarch-test`: use `std::sync::LazyLock` instead of `lazy_static!`
Diffstat (limited to 'library/stdarch/crates/stdarch-test/src/lib.rs')
| -rw-r--r-- | library/stdarch/crates/stdarch-test/src/lib.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/library/stdarch/crates/stdarch-test/src/lib.rs b/library/stdarch/crates/stdarch-test/src/lib.rs index f6614f6d51c..f6732cd15ce 100644 --- a/library/stdarch/crates/stdarch-test/src/lib.rs +++ b/library/stdarch/crates/stdarch-test/src/lib.rs @@ -7,13 +7,11 @@ #![allow(clippy::missing_docs_in_private_items, clippy::print_stdout)] #[macro_use] -extern crate lazy_static; -#[macro_use] extern crate cfg_if; pub use assert_instr_macro::*; pub use simd_test_macro::*; -use std::{cmp, collections::HashSet, env, hash, hint::black_box, str}; +use std::{cmp, collections::HashSet, env, hash, hint::black_box, str, sync::LazyLock}; cfg_if! { if #[cfg(target_arch = "wasm32")] { @@ -25,9 +23,7 @@ cfg_if! { } } -lazy_static! { - static ref DISASSEMBLY: HashSet<Function> = disassemble_myself(); -} +static DISASSEMBLY: LazyLock<HashSet<Function>> = LazyLock::new(disassemble_myself); #[derive(Debug)] struct Function { |
