-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
#![feature(const_fn)]
causes rustdoc to drop the const
keyword when documenting instances of const fn
#76501
Comments
Looks like this is either rust/src/librustdoc/clean/mod.rs Line 903 in 085e417
or rust/src/librustdoc/clean/mod.rs Lines 1156 to 1160 in 085e417
cc @GuillaumeGomez - do you know what those are doing/why they exist? |
It's because of the feature. As long as it's not stable, they don't want the |
Yeah, that makes no sense to me at all. I have a crate that is very much nightly-only containing a rather large number of I of course cannot disable the flag either as then the crate won't compile, as much of what I'm doing does not fit into the stabilized At the very least, surely there must be some way to make it possible to specifically tell rustdoc to "please always document |
@GuillaumeGomez I think the metric should be 'does this have |
I wonder if this isn't an artifact of the switch when adding |
I wonder if this ever worked ... @slightlyoutofphase do you mind trying this with an old version of rustdoc? Preferably before cc @lcnr |
@jyn514 I'll try that on my crate later today. |
After testing both the example I gave here and my own crate with various nightlies from before |
(apologies to lcnr for the ping) |
#![feature(const_fn)]
somehow causes rustdoc to drop the const
keyword while documenting actual instances of const fn
#![feature(const_fn)]
causes rustdoc to drop the const
keyword when documenting instances of const fn
If this helps at all, whichever version of rustdoc |
Ok, so I think I was reading the dates on the PRs a bit wrong when I tested yesterday as far as the timeframe for when I just did a whole bunch more one-by-one testing of nightlies from August, and in fact the problem doesn't quite predate Specifically, the very last nightly to have a rustdoc that documents |
@slightlyoutofphase consider using https://github.com/rust-lang/cargo-bisect-rustc/blob/master/TUTORIAL.md instead which will do it automatically |
Well, I already know it's a commit from between the 10th and 11th of August now, at least. Also, |
Use `is_unstable_const_fn` instead of `is_min_const_fn` in rustdoc where appropriate This closes rust-lang#76501. Specifically, it allows for nightly users with the `#![feature(const_fn)]` flag enabled to still have their `const fn` declarations documented as such, while retaining the desired behavior that rustdoc *not* document functions that have the `rustc_const_unstable` attribute as `const`.
Use `is_unstable_const_fn` instead of `is_min_const_fn` in rustdoc where appropriate This closes rust-lang#76501. Specifically, it allows for nightly users with the `#![feature(const_fn)]` flag enabled to still have their `const fn` declarations documented as such, while retaining the desired behavior that rustdoc *not* document functions that have the `rustc_const_unstable` attribute as `const`.
This is a follow-up on the now-closed issue I opened earlier, with the requested minimal reproduction in the form of a simple
lib.rs
.The text was updated successfully, but these errors were encountered: