Skip to content

The "unstable" documentation attribute on intrinsics should mention the specific stabilized interface for each individual intrinsic #34338

Closed
@bstrie

Description

@bstrie

Today if one navigates to the docs to, for example, intrinsic::volatile_store (http://doc.rust-lang.org/core/intrinsics/fn.volatile_store.html) you see this warning:

Unstable (core_intrinsics): intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library

But not all intrinsics have stabilized interfaces, and even when they exist this message is not helpful in determining exactly what those interfaces are.

In the specific example of intrinsic::volatile_store, this should mention that its stabilized interface is ptr::write_volatile (https://doc.rust-lang.org/std/ptr/fn.write_volatile.html).

Intrinsics that do not have such stabilized interfaces should have instead reference issues in the Rust bug tracker that involve creating stabilized interfaces, or alternately a metabug that covers all unstable intrinsics that do not have stable interfaces.

If it has been decided that a given intrinsic will never have a stabilized interface for whatever reason, then the unstable documentation attribute should contain the reason why, and/or a link to the discussion where such a decision was arrived upon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-intrinsicsArea: IntrinsicsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-libs-apiRelevant to the library API 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