stdarch icon indicating copy to clipboard operation
stdarch copied to clipboard

Documentation for aarch64 claims that anything from arm_shared is unstable

Open pthariensflame opened this issue 4 years ago • 5 comments

In the current nightly documentation for core::arch::aarch64 and for its contained items, the definitions from arm_shared that are reexported by aarch64 are shown as unstable, despite being able to inspect the source and thus prove otherwise. Everything defined within aarch64 directly seems to be displayed properly; it's only the things shared with arm that are misbehaving here.

Screenshots for proof

Main module page, affected parts

Screen Shot 2021-12-16 at 8 22 40 PM Screen Shot 2021-12-16 at 8 23 28 PM

Individual item pages, affected parts

Screen Shot 2021-12-16 at 8 15 44 PM Screen Shot 2021-12-16 at 8 24 00 PM

Main module page, unaffected parts

Screen Shot 2021-12-16 at 8 32 51 PM Screen Shot 2021-12-16 at 8 34 22 PM

Individual item pages, unaffected parts

Screen Shot 2021-12-16 at 8 37 12 PM Screen Shot 2021-12-16 at 8 36 15 PM

pthariensflame avatar Dec 17 '21 06:12 pthariensflame

The issue here is that we have only stabilized these intrinsics on aarch64, but not on arm. This is done using an attribute like:

#[cfg_attr(target_arch = "aarch64", stable(feature = "neon_intrinsics", since = "1.59.0"))]

However the Rust docs are built on x86_64, which means that the cfg does not trigger and the function is marked as unstable.

I'm not sure what we should do here:

  • Ignore the problem until it solves itself when the arm intrinsics are also stabilized?
  • Change the cfg to not(target_arch = "arm") so it appears as stable in the docs? But then the docs are still misleading on arm.

Amanieu avatar Dec 18 '21 23:12 Amanieu

Does rustdoc not have a way to write, say, #[doc(stable)], under a cfg_attr if needed?

pthariensflame avatar Dec 19 '21 00:12 pthariensflame

Alternatively, could rustdoc for core::arch be built on all stabilized platforms and then recomposed with the rest of core?

pthariensflame avatar Dec 19 '21 00:12 pthariensflame

At this point it's probably easier to just move ahead with the stabilization of arm intrinisics.

Amanieu avatar Dec 19 '21 00:12 Amanieu

Partially fixed by #1345.

Amanieu avatar Oct 25 '22 16:10 Amanieu