Work around docs.rs using an old 1.26-dev compiler

This commit is contained in:
David Tolnay 2018-05-28 19:58:27 -07:00
parent a39199e9f7
commit c81bab18ad
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 7 additions and 2 deletions

View File

@ -23,6 +23,11 @@ serde_derive = { version = "1.0", optional = true, path = "../serde_derive" }
[dev-dependencies] [dev-dependencies]
serde_derive = { version = "1.0", path = "../serde_derive" } serde_derive = { version = "1.0", path = "../serde_derive" }
[package.metadata.docs.rs]
# Temporary cfg to work around docs.rs using an old 1.26-dev compiler.
rustc-args = ["--cfg", "serde_docs_rs"]
rustdoc-args = ["--cfg", "serde_docs_rs"]
### FEATURES ################################################################# ### FEATURES #################################################################

View File

@ -70,7 +70,7 @@
/// ($($tt:tt)*) => {}; /// ($($tt:tt)*) => {};
/// } /// }
/// ``` /// ```
#[cfg(integer128)] #[cfg(all(integer128, not(serde_docs_rs)))]
#[macro_export] #[macro_export]
macro_rules! serde_if_integer128 { macro_rules! serde_if_integer128 {
($($tt:tt)*) => { ($($tt:tt)*) => {
@ -78,7 +78,7 @@ macro_rules! serde_if_integer128 {
}; };
} }
#[cfg(not(integer128))] #[cfg(any(not(integer128), serde_docs_rs))]
#[macro_export] #[macro_export]
#[doc(hidden)] #[doc(hidden)]
macro_rules! serde_if_integer128 { macro_rules! serde_if_integer128 {