-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Stabilize #![feature(staged_api)]
#79663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This seems like it would not really be a T-compiler/T-rustdoc issue, but rather a proposal to stabilize a subset of the staged_api feature. I think this would be significant enough that we'd want an RFC, likely T-lang, and probably a project group to focus on identifying the problems to solve / solution space before trying to propose a specific solution. |
It may be very helpful to allow users to specify a custom message for the text shown in the rustdoc docs instead of always using "this item/struct is unstable and subject to change" |
What about also requiring |
I think discussion about this should be a pre-RFC on internals or a full-blown RFC, both of which have better tools for interleaved conversations. Probably a pre-RFC since it sounds like |
That sounds like a really nice feature. I agree it needs some design though. |
#![feature(staged_api)]
It would be very hepful for this attribute to support linking to the issue specified (inspired by the Rust Search Extension): This would probably require a way to globally specify a root issue URL for a given crate. EDIT: ah, the original issue description mentions |
Pre-emptively, I would like it if the URL is not required to be an |
Hmm, I wonder if this shouldn't use the existing On another note, (I assume you mean stdlib as well as rustc)
How do you intend to determine if the currently compiling code is stdlib or rustc? Currently this is the way to know, and (AFAIK) there is no other good replacement. |
Huh, apparently I subscribed to this issue at some point, yet I don't recall ever having seen it. To put it bluntly: I strongly oppose stabilizing |
Yes, there was some discussion on discord about this as well. Everyone recognizes the need for a RFC, this is a kind of pre-RFC (I don't think OP realized that an RFC was needed). |
No, even at the time it was something I was targetting. I just wasn't sure if the discussion about it should happen on the RFC or on the issue first. |
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:
feature
only forrustc
.issue
to have a full URL outside ofrustc
(maybe even inside?).reason
, I think it's fine to have a reason.Once this done,
rustdoc
would also need to make some updates: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 likea 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.What do you think?
cc @rust-lang/compiler @rust-lang/rustdoc @RDambrosio016
The text was updated successfully, but these errors were encountered: