-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc: hide constness of fns in stable docs #31098
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
Compare 1.5.0 docs fn new(v: bool) -> AtomicBool and stable docs const fn new(v: bool) -> AtomicBool This documentation change suggests that this a stable change. Yet |
This should a pretty straightforward change for someone looking to get into rustdoc development. |
@tomjakubowski is it? does rustdoc know whether it's documenting stable/beta vs nightly? |
If rustdoc is going to simply remove If not, there's a little more work but it's not too bad. I think simply checking |
I think it should make that distinction. If you are on nightly, you can turn on the feature and use the const fns in const contexts, so you want that information. |
… r=alexcrichton Fixes rust-lang#31098 AFAICT this is the only place where rustdoc explicitly checks if we are on stable before emitting content, so I can't tell if this is the sane way to handle this, or if anything else should be done to make sure that nobody forgets to remove this check when `const` is stabilized.
I don't think this issue is fixed until the docs at /stable/ actually don't show the qualification. |
I think this is still an issue? |
Rustdoc shows const fns as
const
, but you can't call them in a const context because they're still unstable. If you aren't in a const context, it doesn't matter whether the fn is const or not. So it's confusing and maybe it shouldn't be shown at all until the feature is stable.cc @jethrogb
The text was updated successfully, but these errors were encountered: