Enable feature(doc_cfg) during docs.rs documentation build
This commit is contained in:
parent
edb1a586d8
commit
0726b2c479
@ -29,7 +29,7 @@ features = ["derive", "rc"]
|
|||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["derive"]
|
features = ["derive"]
|
||||||
targets = ["x86_64-unknown-linux-gnu"]
|
targets = ["x86_64-unknown-linux-gnu"]
|
||||||
rustdoc-args = ["--generate-link-to-definition"]
|
rustdoc-args = ["--cfg", "doc_cfg", "--generate-link-to-definition"]
|
||||||
|
|
||||||
# This cfg cannot be enabled, but it still forces Cargo to keep serde_derive's
|
# This cfg cannot be enabled, but it still forces Cargo to keep serde_derive's
|
||||||
# version in lockstep with serde's, even if someone depends on the two crates
|
# version in lockstep with serde's, even if someone depends on the two crates
|
||||||
|
@ -98,6 +98,8 @@
|
|||||||
#![doc(html_root_url = "https://docs.rs/serde/1.0.190")]
|
#![doc(html_root_url = "https://docs.rs/serde/1.0.190")]
|
||||||
// Support using Serde without the standard library!
|
// Support using Serde without the standard library!
|
||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
|
// Show which crate feature enables conditionally compiled APIs in documentation.
|
||||||
|
#![cfg_attr(doc_cfg, feature(doc_cfg))]
|
||||||
// Unstable functionality only if the user asks for it. For tracking and
|
// Unstable functionality only if the user asks for it. For tracking and
|
||||||
// discussion of these features please refer to this issue:
|
// discussion of these features please refer to this issue:
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user