Skip to content

Rustdoc error in armv7 -neon with target_feature fp-armv8 #136755

Closed as duplicate of#136766
@sayantn

Description

@sayantn

I tried this code:

#![feature(arm_target_feature)]

#[target_feature(enable = "fp-armv8")]
unsafe fn foo() {}

This always compiles, but in armv7 targets that have -neon target-feature, running rustdoc on it produces the error

error: target feature `fp-armv8` cannot be enabled with `#[target_feature]`: Rust ties `fp-armv8` to `neon`
     --> crates/core_arch/src/arm_shared/neon/generated.rs:15739:48
      |
15739 | #[cfg_attr(target_arch = "arm", target_feature(enable = "fp-armv8,v8"))]
      |                                                ^^^^^^^^^^^^^^^^^^^^^^

Meta

rustc --version --verbose:

rustc 1.86.0-nightly (a9e7b3048 2025-02-07)
binary: rustc
commit-hash: a9e7b30487235621751cc628f170c0f15fb215c4
commit-date: 2025-02-07
host: x86_64-unknown-linux-gnu
release: 1.86.0-nightly
LLVM version: 19.1.7

Related: #133417, #134511

@rustbot label A-target-feature O-Arm T-rustdoc

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.C-bugCategory: This is a bug.O-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions