-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Don't show const
in docs when it's not available
#31329
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Does this break rendering other parts like |
It might, although I can't find it in Originally when I implemented this I added const filtering to the "build function or method" fns, but that required lying about the constness in the struct. If filtering in the render helper doesn't work out do you have an opinion on what I should do? It's not really lying about the constness of an object if it can't be made const in stable, is it? |
After checking it looks like this is indeed only used for Also can this use the |
ConstnessSpace has no knowledge of the type of item it's modifying, so hide the constness a level up.
Sort of like so? |
Awesome! First rust PR :) |
… 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.
Fixes #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.