From d8ace32252c8ca49d9e41be46e5758fbcf666770 Mon Sep 17 00:00:00 2001 From: Frank King Date: Fri, 31 Oct 2025 08:48:01 +0800 Subject: [PATCH] Remove the `#[pin_v2]` test since it produces different errors on different archs --- tests/ui/pin-ergonomics/pin_v2-attr.rs | 20 -------------------- tests/ui/pin-ergonomics/pin_v2-attr.stderr | 8 +------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/tests/ui/pin-ergonomics/pin_v2-attr.rs b/tests/ui/pin-ergonomics/pin_v2-attr.rs index eccb9b6a87bf..cfafe4b0b899 100644 --- a/tests/ui/pin-ergonomics/pin_v2-attr.rs +++ b/tests/ui/pin-ergonomics/pin_v2-attr.rs @@ -135,24 +135,4 @@ macro_rules! macro_def { #[pin_v2] //~ ERROR `#[pin_v2]` attribute cannot be used on macro calls macro_def!(); -// Restricted on architectures where inline assembly is stable -// accroding to `compiler/rustc_ast_lowering/src/asm.rs` -#[cfg(any( - target_arch = "x86", - target_arch = "x86_64", - target_arch = "arm", - target_arch = "aarch64", - target_arch = "arm64ec", - target_arch = "riscv32", - target_arch = "riscv64", - target_arch = "loongarch32", - target_arch = "loongarch64", - target_arch = "s390x", -))] -std::arch::global_asm! { - "{}", - #[pin_v2] //~ ERROR this attribute is not supported on assembly - const 0 -} - fn main() {} diff --git a/tests/ui/pin-ergonomics/pin_v2-attr.stderr b/tests/ui/pin-ergonomics/pin_v2-attr.stderr index 607dccd4019b..81e086f5a7ef 100644 --- a/tests/ui/pin-ergonomics/pin_v2-attr.stderr +++ b/tests/ui/pin-ergonomics/pin_v2-attr.stderr @@ -6,12 +6,6 @@ LL | #[pin_v2] | = help: `#[pin_v2]` can be applied to data types and unions -error: this attribute is not supported on assembly - --> $DIR/pin_v2-attr.rs:154:5 - | -LL | #[pin_v2] - | ^^^^^^^^^ - error: allow, cfg, cfg_attr, deny, expect, forbid, and warn are the only allowed built-in attributes in function parameters --> $DIR/pin_v2-attr.rs:84:12 | @@ -314,5 +308,5 @@ LL | #[pin_v2] | = help: `#[pin_v2]` can be applied to data types and unions -error: aborting due to 40 previous errors +error: aborting due to 39 previous errors