-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustdoc: prefer showing enum variants as written #131975
base: master
Are you sure you want to change the base?
Conversation
r? @notriddle rustbot has assigned @notriddle. Use |
The job Click to see the possible cause of the failure (guessed by this bot)
|
the failing unit test is explicitly expecting the old behavior, i'll update it if we decide we actually want this behavior... i have a feeling i'm just reverting a previous change. |
maybe we could shove this behind an attribute, idk |
do new doc attributes have to go through the RFC process, even though they don't have an effect on the language semantics? i know the an attribute really does seem like the best way of doing this. |
If I'm not mistaken, T-rustdoc has virtually full authority over In any case, the RFC process is a tool we can & arguably should use for such impactful decisions. However, similar to T-lang's alternative processes for feature development like lang experiments (formerly lang MCPs), we (can allow ourselves to) have some wiggle room. For example, an MVP for Personally speaking I'm fine with adding an unstable |
Well, it's tricky nonetheless and we have a lot of users, we should be mindful. Things can be missed at first sight. See for example issue #131625 which regressed due to PR #95316 in which I changed rustdoc to evaluate & print the RHS of associated constants1. It also lead to various other user reports like #99630, #102456 (and to the creation of PR #99688 which in turn kicked off the whole "new const display" topic that notriddle has already linked). Footnotes
|
how about a |
FWIW making this change will add yet another inconsistency for cross-crate re-exports. Because HIR is not available when inlining an item from another crate (e.g., when inlining a const from I'm somewhat against having a |
Perhaps this is a situation where we could use rustdoc CCI (rust-lang/rfcs#3662) to store the original expression for public constants (that could potentially be inlined by other crates) so that we don't have the cross-crate issue. |
fixes #128347