From: Ralf Jung Date: Fri, 28 Feb 2025 15:51:53 +0000 (+0100) Subject: add test X-Git-Tag: archive/raspbian/1.85.0+dfsg2-2+rpi1~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3e8d878c40118510cfb639f6b0488321eaab4792;p=rustc.git add test (cherry picked from commit dc04c0ca48c7285d74a0489354ed7d013dc25799) --- diff --git a/tests/rustdoc-ui/target-feature-stability.rs b/tests/rustdoc-ui/target-feature-stability.rs new file mode 100644 index 0000000000..4ade969031 --- /dev/null +++ b/tests/rustdoc-ui/target-feature-stability.rs @@ -0,0 +1,18 @@ +//! This is a regression test for , ensuring +//! that we can use the `neon` target feature on ARM-32 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 + +#![crate_type = "lib"] +#![feature(no_core, lang_items)] +#![feature(arm_target_feature)] +#![no_core] + +#[lang = "sized"] +pub trait Sized {} + +// `fp-armv8` is "forbidden" on aarch64 as we tie it to `neon`. +#[target_feature(enable = "fp-armv8")] +pub fn fun() {}