-
Notifications
You must be signed in to change notification settings - Fork 434
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
doc_cfg #442
Comments
I figured out that I can just enable it (in #439). But We should discuss if I'm allowed to use it :-) |
Not sure what you mean by allowing it in the current build system -- all unstable features are allowed inside The big question is, as usual, whether to add it to the list of unstable features or not. While for "custom" docs (i.e. docs generated for a given From a quick look, there is still discussion going around Ideally the compiler would ignore this feature when not generating the docs (so that it would not "count" as an unstable feature when not generating docs). I have taken a look at the generated docs for something like: #[cfg(any(CONFIG_SYSCTL, doc))]
#[doc(cfg(CONFIG_SYSCTL))]
pub mod sysctl; and it looks very nice! |
Actually, that gives me an idea: On our side, we could then automatically fill it with the titles from
instead of:
(It looks worse here than in the generated docs). |
Given that we pin to a specify Rust version, I think we could be more liberal when it comes to use unstable features that wouldn't be difficult to remove in the future. For things like
Sounds like something doable by some simple text postprocessing :) |
The problem is not so much about removing them (which introduces churn, specially in mainline, but it is not a big deal), but about getting sooner to the point where we can compile the kernel without unstable features. In general, we should see the pinning as temporary, and work towards avoiding it, rather than the opposite (i.e. adding more features :)
Definitely! I usually try to describe things in terms of what upstream could provide as a feature. Submitted, by the way: rust-lang/rust#87139. |
Closes Rust-for-Linux#442. Suggested-by: Finn Behrens <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]>
I would like to use doc_cfg for documentation. I don't have a clue about the current build system. Would it be trivial to allow? @ojeda can you do that? Also, is this allowed, or would it be a to unstable feature?
The text was updated successfully, but these errors were encountered: