-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Description
error[E0658]: `#[doc(cfg)]` is experimental
--> .../include_dir-0.7.1/src/lib.rs:102:1
|
102 | #[doc(cfg(feature = "glob"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I don't think you need it at all because since recently #[cfg]
implies #[doc(cfg)]
(rust-lang/rust#89596).
Also, in some very rare cases when it may not work and you need to do it manually, you can do this:
- In
Cargo.toml
:[package.metadata.docs.rs] features = ["foo", "bar"] rustdoc-args = ["--cfg", "docsrs"]
- In
lib.rs
:#![cfg_attr(docsrs, feature(doc_cfg))]
- And then you can safely do:
#[cfg_attr(docrs, doc(cfg(feature = "foo")))]
- And in order to build docs locally:
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --features foo,bar
Metadata
Metadata
Assignees
Labels
No labels