Remove the #[pin_v2] test since it produces different errors on different archs

This commit is contained in:
Frank King 2025-10-31 08:48:01 +08:00 committed by 王俊吉
parent e614ed4456
commit d8ace32252
2 changed files with 1 additions and 27 deletions

View file

@ -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() {}

View file

@ -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