Closed aldanor closed 2 years ago
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)] (https://github.com/rust-lang/rust/pull/89596).
#[cfg]
#[doc(cfg)]
Also, in some very rare cases when it may not work and you need to do it manually, you can do this:
Cargo.toml
[package.metadata.docs.rs] features = ["foo", "bar"] rustdoc-args = ["--cfg", "docsrs"]
lib.rs
#![cfg_attr(docsrs, feature(doc_cfg))]
#[cfg_attr(docrs, doc(cfg(feature = "foo")))]
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --features foo,bar
we ran into this today also when trying to upgrade to the new 0.7.1 version, blocking the upgrade
I don't think you need it at all because since recently
#[cfg]
implies#[doc(cfg)]
(https://github.com/rust-lang/rust/pull/89596).Also, in some very rare cases when it may not work and you need to do it manually, you can do this:
Cargo.toml
:lib.rs
: