diff options
| author | Ralf Jung <post@ralfj.de> | 2025-02-28 16:56:36 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-03-01 15:14:02 +0100 |
| commit | 4c939db0e775df21a0b409b7603eaaf0056e8f86 (patch) | |
| tree | e0fe28ae3f72f9f30d24143e068c9ae39e0995ac /tests/rustdoc-ui/target-feature-stability.rs | |
| parent | dc04c0ca48c7285d74a0489354ed7d013dc25799 (diff) | |
| download | rust-4c939db0e775df21a0b409b7603eaaf0056e8f86.tar.gz rust-4c939db0e775df21a0b409b7603eaaf0056e8f86.zip | |
also skip abi_required_features check in rustdoc
Diffstat (limited to 'tests/rustdoc-ui/target-feature-stability.rs')
| -rw-r--r-- | tests/rustdoc-ui/target-feature-stability.rs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/rustdoc-ui/target-feature-stability.rs b/tests/rustdoc-ui/target-feature-stability.rs index 4ade9690310..17fa3ccfe3e 100644 --- a/tests/rustdoc-ui/target-feature-stability.rs +++ b/tests/rustdoc-ui/target-feature-stability.rs @@ -1,9 +1,13 @@ //! This is a regression test for <https://github.com/rust-lang/rust/issues/137366>, ensuring -//! that we can use the `neon` target feature on ARM-32 targets in rustdoc despite there +//! that we can use the `neon` target feature on ARM32 targets in rustdoc despite there //! being a "forbidden" feature of the same name for aarch64, and rustdoc merging the //! target features of all targets. //@ check-pass -//@ compile-flags: --target armv7-unknown-linux-gnueabihf +//@ revisions: arm aarch64 +//@[arm] compile-flags: --target armv7-unknown-linux-gnueabihf +//@[arm] needs-llvm-components: arm +//@[aarch64] compile-flags: --target aarch64-unknown-none-softfloat +//@[aarch64] needs-llvm-components: aarch64 #![crate_type = "lib"] #![feature(no_core, lang_items)] @@ -15,4 +19,10 @@ pub trait Sized {} // `fp-armv8` is "forbidden" on aarch64 as we tie it to `neon`. #[target_feature(enable = "fp-armv8")] -pub fn fun() {} +pub fn fun1() {} + +// This would usually be rejected as it changes the ABI. +// But we disable that check in rustdoc since we are building "for all targets" and the +// check can't really handle that. +#[target_feature(enable = "soft-float")] +pub fn fun2() {} |
