-
Notifications
You must be signed in to change notification settings - Fork 13k
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: the required const feature gate is not shown #131618
Comments
Turns out the "const: unstable" has a tooltip indicating the const feature gate. But that can't be used for copy-paste, and it is quite hard to notice. |
The biggest problem I see is how to handle this on mobile devices. Also, function and method pages are rendered quite differently. |
Well today we use a tooltip which doesn't work well at all here... Also, if we can fix this for desktop users only, that's still better than the status quo. Most of us don't program on a mobile device, I assume, and so having the docs work well on large formfactors is quite relevant. |
yeah, i was thinking we could just tweak the current rendering to |
Shouldn't be a tooltip but full-fledged text thing like feature-gate items. |
It's not a tooltip but a link to the tracking issue. So that doesn't change much to what I planned to do but it wasn't as pressing as I thought it was. ^^' |
Anyway, opened #135830. |
For regular unstable functions, rustdoc shows something like this
However, for const-unstable functions, all we get is
There's no indication of what the feature gate is. Worse, if the function is unstable and const-unstable, but under different feature gates, then there's not even the "const: unstable" that links to the issue -- there's no way to figure out what the const feature gate is other than looking at the source.
Cc @rust-lang/rustdoc
The text was updated successfully, but these errors were encountered: