Skip to content

Stabilize #![feature(staged_api)] #79663

Open
@GuillaumeGomez

Description

@GuillaumeGomez

The idea behind it is to allow users to mark items as not yet stable for their crates, allowing them to change it without requiring to make a new major release. It'll will require a few changes though. Currently, the unstable attribute looks like this:

#[unstable(feature = "some_feature", reason = "some reason", issue = "123")]

So here is what I suggest:

  • Enforce feature only for rustc.
  • Force issue to have a full URL outside of rustc (maybe even inside?).
  • Keep reason, I think it's fine to have a reason.

Once this done, rustdoc would also need to make some updates:

  • If unstable is used on a module, all its children (and children of its children recursively) should say that a parent is unstable and therefore this item is unstable too (which is message like a parent of _child_ is unstable, therefore _child_ is unstable too). This message should be put at the top of the item page and not repeated on any of the element of the page to prevent adding unnecessary noise.
  • If both a parent and the item are unstable, only display the message of the item.
  • If two parents are unstable, only print message of the closest one.

What do you think?

cc @rust-lang/compiler @rust-lang/rustdoc @RDambrosio016

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.needs-rfcThis change is large or controversial enough that it should have an RFC accepted before doing it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions