From 8194704c8b8ff15b3e82d03635af0afdb849f9f9 Mon Sep 17 00:00:00 2001 From: tyranron Date: Wed, 26 Jul 2023 19:33:39 +0300 Subject: [PATCH 1/4] Disambiguate README intra-doc links --- src/lib.rs | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5219c2af..986aa728 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,32 +1,32 @@ // These links overwrite the ones in `README.md` // to become proper intra-doc links in Rust docs. -//! [`From`]: crate::From -//! [`Into`]: crate::Into -//! [`FromStr`]: crate::FromStr -//! [`TryInto`]: crate::TryInto -//! [`IntoIterator`]: crate::IntoIterator -//! [`AsRef`]: crate::AsRef +//! [`From`]: macro@crate::From +//! [`Into`]: macro@crate::Into +//! [`FromStr`]: macro@crate::FromStr +//! [`TryInto`]: macro@crate::TryInto +//! [`IntoIterator`]: macro@crate::IntoIterator +//! [`AsRef`]: macro@crate::AsRef //! -//! [`Debug`]: crate::Debug -//! [`Display`-like]: crate::Display +//! [`Debug`]: macro@crate::Debug +//! [`Display`-like]: macro@crate::Display //! -//! [`Error`]: crate::Error +//! [`Error`]: macro@crate::Error //! -//! [`Index`]: crate::Index -//! [`Deref`]: crate::Deref -//! [`Not`-like]: crate::Not -//! [`Add`-like]: crate::Add -//! [`Mul`-like]: crate::Mul -//! [`Sum`-like]: crate::Sum -//! [`IndexMut`]: crate::IndexMut -//! [`DerefMut`]: crate::DerefMut -//! [`AddAssign`-like]: crate::AddAssign -//! [`MulAssign`-like]: crate::MulAssign +//! [`Index`]: macro@crate::Index +//! [`Deref`]: macro@crate::Deref +//! [`Not`-like]: macro@crate::Not +//! [`Add`-like]: macro@crate::Add +//! [`Mul`-like]: macro@crate::Mul +//! [`Sum`-like]: macro@crate::Sum +//! [`IndexMut`]: macro@crate::IndexMut +//! [`DerefMut`]: macro@crate::DerefMut +//! [`AddAssign`-like]: macro@crate::AddAssign +//! [`MulAssign`-like]: macro@crate::MulAssign //! -//! [`Constructor`]: crate::Constructor -//! [`IsVariant`]: crate::IsVariant -//! [`Unwrap`]: crate::Unwrap -//! [`TryUnwrap`]: crate::TryUnwrap +//! [`Constructor`]: macro@crate::Constructor +//! [`IsVariant`]: macro@crate::IsVariant +//! [`Unwrap`]: macro@crate::Unwrap +//! [`TryUnwrap`]: macro@crate::TryUnwrap // The README includes doctests requiring these features. To make sure that // tests pass when not all features are provided we exclude it when the From d7a497b1943b2208b207c1000a2014519e290cd0 Mon Sep 17 00:00:00 2001 From: tyranron Date: Wed, 26 Jul 2023 19:34:07 +0300 Subject: [PATCH 2/4] Do not re-export traits on docs.rs --- src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 986aa728..91201a19 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -97,15 +97,14 @@ pub use self::try_unwrap::TryUnwrapError; // derive. macro_rules! re_export_traits(( $feature:literal, $new_module_name:ident, $module:path $(, $traits:ident)* $(,)?) => { - #[cfg(feature = $feature)] + #[cfg(all(feature = $feature, any(not(docsrs), ci)))] mod $new_module_name { pub use $module::{$($traits),*}; } - #[cfg(feature = $feature)] + #[cfg(all(feature = $feature, any(not(docsrs), ci)))] #[doc(hidden)] pub use crate::$new_module_name::*; - } ); From 2d52cccbae4ccad511de2554ab25878372e7e625 Mon Sep 17 00:00:00 2001 From: tyranron Date: Wed, 26 Jul 2023 19:44:29 +0300 Subject: [PATCH 3/4] Fix version in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c8e80e9b..bf552fd5 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ in `Cargo.toml`: ```toml [dependencies] -derive_more = "0.99.0" +derive_more = "1.0.0-beta.3" # You can specify the types of derives that you need for less time spent # compiling. For the full list of features see this crate its `Cargo.toml`. features = ["from", "add", "iterator"] From 4fc9b6a754f928c495fbaa848886c68cf1865f00 Mon Sep 17 00:00:00 2001 From: Kai Ren Date: Wed, 26 Jul 2023 19:59:14 +0300 Subject: [PATCH 4/4] Update version in README to be strict Co-authored-by: Jelte Fennema --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf552fd5..758e7976 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ in `Cargo.toml`: ```toml [dependencies] -derive_more = "1.0.0-beta.3" +derive_more = "=1.0.0-beta.3" # You can specify the types of derives that you need for less time spent # compiling. For the full list of features see this crate its `Cargo.toml`. features = ["from", "add", "iterator"]