rust/tests/ui/target-feature
bors e8c698bb3b Auto merge of #129884 - RalfJung:forbidden-target-features, r=workingjubilee
mark some target features as 'forbidden' so they cannot be (un)set with -Ctarget-feature

The context for this is https://github.com/rust-lang/rust/issues/116344: some target features change the way floats are passed between functions. Changing those target features is unsound as code compiled for the same target may now use different ABIs.

So this introduces a new concept of "forbidden" target features (on top of the existing "stable " and "unstable" categories), and makes it a hard error to (un)set such a target feature. For now, the x86 and ARM feature `soft-float` is on that list. We'll have to make some effort to collect more relevant features, and similar features from other targets, but that can happen after the basic infrastructure for this landed. (These features are being collected in https://github.com/rust-lang/rust/issues/131799.)

I've made this a warning for now to give people some time to speak up if this would break something.

MCP: https://github.com/rust-lang/compiler-team/issues/780
2024-11-05 16:25:45 +00:00
..
auxiliary mark some target features as 'forbidden' so they cannot be (un)set 2024-11-04 22:56:47 +01:00
aarch64-neon-works.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
asm-implied-features-issue-128125.rs Add test to ensure implied target features work with asm, and fix failing tests 2024-08-07 00:41:48 -04:00
feature-hierarchy.rs remove support for extern-block const intrinsics 2024-11-04 23:27:45 +01:00
forbidden-target-feature-attribute.rs mark some target features as 'forbidden' so they cannot be (un)set 2024-11-04 22:56:47 +01:00
forbidden-target-feature-attribute.stderr mark some target features as 'forbidden' so they cannot be (un)set 2024-11-04 22:56:47 +01:00
forbidden-target-feature-cfg.rs mark some target features as 'forbidden' so they cannot be (un)set 2024-11-04 22:56:47 +01:00
forbidden-target-feature-flag-disable.rs mark some target features as 'forbidden' so they cannot be (un)set 2024-11-04 22:56:47 +01:00
forbidden-target-feature-flag-disable.stderr mark some target features as 'forbidden' so they cannot be (un)set 2024-11-04 22:56:47 +01:00
forbidden-target-feature-flag.rs mark some target features as 'forbidden' so they cannot be (un)set 2024-11-04 22:56:47 +01:00
forbidden-target-feature-flag.stderr mark some target features as 'forbidden' so they cannot be (un)set 2024-11-04 22:56:47 +01:00
gate.rs rustc_target: Add various aarch64 features 2024-08-27 11:11:47 +01:00
gate.stderr tests: Update with new aarch64 target features 2024-08-27 12:06:30 +00:00
implicit-features-cli.rs Implement a implicit target feature mechanism 2024-08-04 08:44:23 +02:00
implicit-features.rs Implement a implicit target feature mechanism 2024-08-04 08:44:23 +02:00
implied-features.rs Add test to ensure implied target features work with asm, and fix failing tests 2024-08-07 00:41:48 -04:00
invalid-attribute.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
invalid-attribute.stderr Merge collect_mod_item_types query into check_well_formed 2024-03-07 14:26:31 +00:00
missing-plusminus-2.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
missing-plusminus-2.stderr
missing-plusminus.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
missing-plusminus.stderr
no-llvm-leaks.rs remove support for extern-block const intrinsics 2024-11-04 23:27:45 +01:00
rust-specific-name-no-warnings.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
similar-feature-suggestion.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
similar-feature-suggestion.stderr warn when using an unstable feature with -Ctarget-feature 2023-11-06 09:44:00 +01:00
tied-features-cli.one.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
tied-features-cli.rs Fix test problems discovered by the revision check 2024-05-09 14:47:09 +10:00
tied-features-cli.three.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
tied-features-cli.two.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
tied-features-no-implication-1.paca.stderr tests: add test for #105111 2024-09-24 15:42:15 +01:00
tied-features-no-implication-1.pacg.stderr tests: add test for #105111 2024-09-24 15:42:15 +01:00
tied-features-no-implication-1.rs tests: add test for #105111 2024-09-24 15:42:15 +01:00
tied-features-no-implication.paca.stderr tests: add test for #105111 2024-09-24 15:42:15 +01:00
tied-features-no-implication.pacg.stderr tests: add test for #105111 2024-09-24 15:42:15 +01:00
tied-features-no-implication.rs tests: add test for #105111 2024-09-24 15:42:15 +01:00
tied-features.rs codegen_ssa: consolidate tied feature checking 2024-09-24 15:48:49 +01:00
tied-features.stderr codegen_ssa: consolidate tied feature checking 2024-09-24 15:48:49 +01:00
unstable-feature.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
unstable-feature.stderr warn when using an unstable feature with -Ctarget-feature 2023-11-06 09:44:00 +01:00
using-target-feature-unstable.rs mark some target features as 'forbidden' so they cannot be (un)set 2024-11-04 22:56:47 +01:00
wasm-disable-simd.rs Add a regression test for #131031 2024-10-30 22:34:45 +08:00
wasm-relaxed-simd.rs Implement a implicit target feature mechanism 2024-08-04 08:44:23 +02:00
wasm-safe.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00