@@ -65,8 +65,8 @@ macro_rules! sym {
6565 } ;
6666 ( @impl $sym: expr) => { {
6767 // Note: Using `crate` to refer to the calling crate - this is deliberate.
68- #[ cfg_attr( not( target_arch = "wasm32" ) , $crate:: internal:: linkme:: distributed_slice( crate :: _stringleton_enabled:: TABLE ) ) ]
69- #[ cfg_attr( not( target_arch = "wasm32" ) , linkme( crate = $crate:: internal:: linkme) ) ]
68+ #[ cfg_attr( not( any ( miri , target_arch = "wasm32" ) ) , $crate:: internal:: linkme:: distributed_slice( crate :: _stringleton_enabled:: TABLE ) ) ]
69+ #[ cfg_attr( not( any ( miri , target_arch = "wasm32" ) ) , linkme( crate = $crate:: internal:: linkme) ) ]
7070 static SITE : $crate:: internal:: Site = $crate:: internal:: Site :: new( & $sym) ;
7171 unsafe {
7272 // SAFETY: This site will be initialized by the static ctor because
@@ -133,8 +133,8 @@ macro_rules! static_sym {
133133 // Tiny function just to get the `Site` for this symbol.
134134 fn _stringleton_static_symbol_call_site( ) -> & ' static $crate:: internal:: Site {
135135 // Note: Using `crate` to refer to the calling crate - this is deliberate.
136- #[ cfg_attr( not( target_arch = "wasm32" ) , $crate:: internal:: linkme:: distributed_slice( crate :: _stringleton_enabled:: TABLE ) ) ]
137- #[ cfg_attr( not( target_arch = "wasm32" ) , linkme( crate = $crate:: internal:: linkme) ) ]
136+ #[ cfg_attr( not( any ( miri , target_arch = "wasm32" ) ) , $crate:: internal:: linkme:: distributed_slice( crate :: _stringleton_enabled:: TABLE ) ) ]
137+ #[ cfg_attr( not( any ( miri , target_arch = "wasm32" ) ) , linkme( crate = $crate:: internal:: linkme) ) ]
138138 static SITE : $crate:: internal:: Site = $crate:: internal:: Site :: new( & $sym) ;
139139 & SITE
140140 }
@@ -183,7 +183,7 @@ macro_rules! static_sym {
183183macro_rules! enable {
184184 ( ) => {
185185 #[ doc( hidden) ]
186- #[ cfg( not( target_arch = "wasm32" ) ) ]
186+ #[ cfg( not( any ( miri , target_arch = "wasm32" ) ) ) ]
187187 pub ( crate ) mod _stringleton_enabled {
188188 #[ $crate:: internal:: linkme:: distributed_slice]
189189 #[ linkme( crate = $crate:: internal:: linkme) ]
@@ -204,11 +204,12 @@ macro_rules! enable {
204204
205205 #[ allow( unused) ]
206206 #[ doc( hidden) ]
207- #[ cfg( not( target_arch = "wasm32" ) ) ]
207+ #[ cfg( not( any ( miri , target_arch = "wasm32" ) ) ) ]
208208 pub use _stringleton_enabled:: _stringleton_register_symbols;
209209 } ;
210210 ( $krate: path) => {
211211 #[ doc( hidden) ]
212+ #[ cfg( not( any( miri, target_arch = "wasm32" ) ) ) ]
212213 pub ( crate ) use $krate:: _stringleton_enabled;
213214 } ;
214215}
@@ -233,7 +234,7 @@ mod tests {
233234
234235 use hashbrown:: HashMap ;
235236
236- use super :: { StaticSymbol , Symbol , static_sym , sym } ;
237+ use super :: { StaticSymbol , Symbol } ;
237238
238239 #[ test]
239240 #[ cfg( feature = "alloc" ) ]
0 commit comments