Skip to content

Commit 851f165

Browse files
committed
Use official cfg(docsrs) for doc_cfg
This reverts 3ad5d30.
1 parent 71c8843 commit 851f165

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ jobs:
5151
event_name: ${{ github.event_name }}
5252
tidy:
5353
uses: taiki-e/github-actions/.github/workflows/tidy.yml@main
54-
with:
55-
known-cfgs: syn_serde_doc_cfg
5654

5755
test:
5856
strategy:

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Library to serialize and deserialize Syn syntax trees.
1414

1515
[package.metadata.docs.rs]
1616
all-features = true
17-
rustdoc-args = ["--cfg", "syn_serde_doc_cfg"]
1817
targets = ["x86_64-unknown-linux-gnu"]
1918

2019
[package.metadata.cargo_check_external_types]

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ The data structures of syn-serde 0.3 is compatible with the data structures of
128128
clippy::used_underscore_binding,
129129
clippy::wildcard_imports
130130
)]
131-
// docs.rs only (cfg is enabled via [package.metadata.docs.rs] in Cargo.toml, not build script)
132-
#![cfg_attr(syn_serde_doc_cfg, feature(doc_cfg))]
131+
// docs.rs only (cfg is enabled by docs.rs, not build script)
132+
#![cfg_attr(docsrs, feature(doc_cfg))]
133133

134134
#[macro_use]
135135
mod macros;
@@ -259,7 +259,7 @@ pub use crate::token_stream::{
259259
};
260260

261261
#[cfg(feature = "json")]
262-
#[cfg_attr(syn_serde_doc_cfg, doc(cfg(feature = "json")))]
262+
#[cfg_attr(docsrs, doc(cfg(feature = "json")))]
263263
pub mod json;
264264

265265
mod sealed {

0 commit comments

Comments
 (0)