-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Document/standardize the docsrs
"well-known" feature
#13875
Comments
potentially affected crates can be searched with https://github.com/search?q=%2Frustdoc-args.*--cfg.*docs_rs%2F&type=code |
This is documented in https://docs.rs/about/builds#detecting-docsrs. And yeah agree this is a bit hard to discover. The Cargo team has talked about documenting the interaction of |
* fix(doc): rename doc_cfg guard to docsrs, rust-lang/cargo#13875 * fix(node-wasm): remove unused method in JsContext trait
* Bump k8s-openapi feature to v1_29. * Use standardized `docsrs` cfg instead of our custom `docs_rs`. rust-lang/cargo#13875
Problem
Recently standardized
--check-cfg
started triggering in my project. There is some common pattern in crates that want to use another nightly feature,doc_cfg
, to do stuff like:The cfg attribute was used just to conditionally include the
doc_cfg
feature so that it is only present in docs.rs builds and not require nightly on a daily basis. When adding this I found no mention or whatever about any requirements for the name of the additional cfg flag used for this guard. It looked likedocsrs
is most widely used (eg. by tokio), however I opted in fordocs_rs
as I found it easier to read.After standardizing of
--check-cfg
it turned out it's failing with the given message:Indeed, after switching to
docsrs
everything is fine. I found that it's explicitely included here because that's what docs.rs uses internally, however I couldn't find it in any documentation, nor in the "well-known" names.Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: