Skip to content

Commit

Permalink
Use official cfg(docsrs) for doc_cfg
Browse files Browse the repository at this point in the history
This reverts bf150aa.
  • Loading branch information
taiki-e committed May 5, 2024
1 parent 08f1fef commit 3429326
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ jobs:
all-features: false
tidy:
uses: taiki-e/github-actions/.github/workflows/tidy.yml@main
with:
known-cfgs: assert_unmoved_doc_cfg

test:
strategy:
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ and mutably accessed.

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "assert_unmoved_doc_cfg"]
targets = ["x86_64-unknown-linux-gnu"]

[package.metadata.cargo_check_external_types]
Expand Down
4 changes: 2 additions & 2 deletions src/assert_unmoved.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ impl<F: Future> Future for AssertUnmoved<F> {
}

#[cfg(feature = "futures03")]
#[cfg_attr(assert_unmoved_doc_cfg, doc(cfg(feature = "futures03")))]
#[cfg_attr(docsrs, doc(cfg(feature = "futures03")))]
mod futures03 {
use core::{
pin::Pin,
Expand Down Expand Up @@ -321,7 +321,7 @@ mod futures03 {
}

#[cfg(feature = "tokio1")]
#[cfg_attr(assert_unmoved_doc_cfg, doc(cfg(feature = "tokio1")))]
#[cfg_attr(docsrs, doc(cfg(feature = "tokio1")))]
mod tokio1 {
use core::{
pin::Pin,
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ Note: The MSRV when these features are enabled depends on the MSRV of these crat
// clippy::std_instead_of_alloc,
clippy::std_instead_of_core,
)]
// docs.rs only (cfg is enabled via [package.metadata.docs.rs] in Cargo.toml, not build script)
#![cfg_attr(assert_unmoved_doc_cfg, feature(doc_cfg))]
// docs.rs only (cfg is enabled by docs.rs, not build script)
#![cfg_attr(docsrs, feature(doc_cfg))]

#[cfg(test)]
#[path = "gen/assert_impl.rs"]
Expand Down

0 comments on commit 3429326

Please sign in to comment.