Skip to content

Commit 21b2dc1

Browse files
committed
forbidden target feature tests: consolidate multiple tests in a single one with revisions
1 parent a932eb3 commit 21b2dc1

6 files changed

+11
-33
lines changed

tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable-implied.rs

-15
This file was deleted.

tests/ui/target-feature/forbidden-hardfloat-target-feature-flag-disable-neon.rs

-13
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
//! Ensure ABI-required features cannot be disabled via `-Ctarget-feature`.
2-
//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=lib
3-
//@ needs-llvm-components: x86
4-
//@ compile-flags: -Ctarget-feature=-x87
2+
//! Also covers the case of a feature indirectly disabling another via feature implications.
3+
//@ compile-flags: --crate-type=lib
4+
//@ revisions: x86 x86-implied aarch64
5+
//@[x86] compile-flags: --target=x86_64-unknown-linux-gnu -Ctarget-feature=-x87
6+
//@[x86] needs-llvm-components: x86
7+
//@[x86-implied] compile-flags: --target=x86_64-unknown-linux-gnu -Ctarget-feature=-sse
8+
//@[x86-implied] needs-llvm-components: x86
9+
//@[aarch64] compile-flags: --target=aarch64-unknown-linux-gnu -Ctarget-feature=-neon
10+
//@[aarch64] needs-llvm-components: aarch64
511
// For now this is just a warning.
612
//@ build-pass
713

@@ -11,5 +17,5 @@
1117
#[lang = "sized"]
1218
pub trait Sized {}
1319

14-
//~? WARN target feature `x87` must be enabled to ensure that the ABI of the current target can be implemented correctly
15-
//~? WARN unstable feature specified for `-Ctarget-feature`: `x87`
20+
//~? WARN must be enabled to ensure that the ABI of the current target can be implemented correctly
21+
//[x86]~? WARN unstable feature specified for `-Ctarget-feature`

0 commit comments

Comments
 (0)