diff options
| author | bors <bors@rust-lang.org> | 2025-07-22 15:25:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-07-22 15:25:31 +0000 |
| commit | 2e5367566819ca7878baa9600ae7a93eb0e37bbf (patch) | |
| tree | 6b65029625eb4b6e726b826197e617728788430e /library/stdarch/crates/stdarch-gen-arm/src/expression.rs | |
| parent | 35487a2e7c80012129c38f55c970109a1538c91f (diff) | |
| parent | 9b7d31c851cabc2e6e541d3cf146787d597a9166 (diff) | |
| download | rust-2e5367566819ca7878baa9600ae7a93eb0e37bbf.tar.gz rust-2e5367566819ca7878baa9600ae7a93eb0e37bbf.zip | |
Auto merge of #144222 - Kobzol:stdarch-push, r=folkertdev
stdarch subtree update Subtree update of `stdarch` to https://github.com/rust-lang/stdarch/commit/5531955678494ee28ec02130a6d94082ad4532da. Created using https://github.com/rust-lang/josh-sync. I saw that there were non-trivial changes made to `std_detect` in `stdarch` recently. So I want to get them merged here before we move forward with https://github.com/rust-lang/rust/pull/143412. r? `@folkertdev`
Diffstat (limited to 'library/stdarch/crates/stdarch-gen-arm/src/expression.rs')
| -rw-r--r-- | library/stdarch/crates/stdarch-gen-arm/src/expression.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/library/stdarch/crates/stdarch-gen-arm/src/expression.rs b/library/stdarch/crates/stdarch-gen-arm/src/expression.rs index 56c94602fff..d5644ef27d4 100644 --- a/library/stdarch/crates/stdarch-gen-arm/src/expression.rs +++ b/library/stdarch/crates/stdarch-gen-arm/src/expression.rs @@ -1,5 +1,4 @@ use itertools::Itertools; -use lazy_static::lazy_static; use proc_macro2::{Literal, Punct, Spacing, TokenStream}; use quote::{ToTokens, TokenStreamExt, format_ident, quote}; use regex::Regex; @@ -7,6 +6,7 @@ use serde::de::{self, MapAccess, Visitor}; use serde::{Deserialize, Deserializer, Serialize}; use std::fmt; use std::str::FromStr; +use std::sync::LazyLock; use crate::intrinsic::Intrinsic; use crate::wildstring::WildStringPart; @@ -374,10 +374,8 @@ impl FromStr for Expression { type Err = String; fn from_str(s: &str) -> Result<Self, Self::Err> { - lazy_static! { - static ref MACRO_RE: Regex = - Regex::new(r"^(?P<name>[\w\d_]+)!\((?P<ex>.*?)\);?$").unwrap(); - } + static MACRO_RE: LazyLock<Regex> = + LazyLock::new(|| Regex::new(r"^(?P<name>[\w\d_]+)!\((?P<ex>.*?)\);?$").unwrap()); if s == "SvUndef" { Ok(Expression::SvUndef) |
