diff --git a/tests/test_size.rs b/tests/test_size.rs index 802470a..49ca68e 100644 --- a/tests/test_size.rs +++ b/tests/test_size.rs @@ -3,7 +3,10 @@ extern crate proc_macro; use std::mem; #[rustversion::attr(before(1.64), ignore)] -#[rustversion::attr(since(1.64), cfg_attr(randomize_layout, ignore))] +#[rustversion::attr( + since(1.64), + cfg_attr(any(randomize_layout, not(target_pointer_width = "64")), ignore) +)] #[test] fn test_proc_macro_size() { assert_eq!(mem::size_of::(), 4); @@ -15,7 +18,15 @@ fn test_proc_macro_size() { assert_eq!(mem::size_of::(), 4); } -#[cfg_attr(any(randomize_layout, wrap_proc_macro, span_locations), ignore)] +#[cfg_attr( + any( + randomize_layout, + not(target_pointer_width = "64"), + wrap_proc_macro, + span_locations + ), + ignore +)] #[test] fn test_proc_macro2_fallback_size_without_locations() { assert_eq!(mem::size_of::(), 0); @@ -27,7 +38,15 @@ fn test_proc_macro2_fallback_size_without_locations() { assert_eq!(mem::size_of::(), 8); } -#[cfg_attr(any(randomize_layout, wrap_proc_macro, not(span_locations)), ignore)] +#[cfg_attr( + any( + randomize_layout, + not(target_pointer_width = "64"), + wrap_proc_macro, + not(span_locations) + ), + ignore +)] #[test] fn test_proc_macro2_fallback_size_with_locations() { assert_eq!(mem::size_of::(), 8); @@ -42,7 +61,15 @@ fn test_proc_macro2_fallback_size_with_locations() { #[rustversion::attr(before(1.71), ignore)] #[rustversion::attr( since(1.71), - cfg_attr(any(randomize_layout, not(wrap_proc_macro), span_locations), ignore) + cfg_attr( + any( + randomize_layout, + not(target_pointer_width = "64"), + not(wrap_proc_macro), + span_locations + ), + ignore + ) )] #[test] fn test_proc_macro2_wrapper_size_without_locations() { @@ -59,7 +86,12 @@ fn test_proc_macro2_wrapper_size_without_locations() { #[rustversion::attr( since(1.65), cfg_attr( - any(randomize_layout, not(wrap_proc_macro), not(span_locations)), + any( + randomize_layout, + not(target_pointer_width = "64"), + not(wrap_proc_macro), + not(span_locations) + ), ignore ) )]