From 69cb3e8ddbca5f31efceddced5a514f59fa905df Mon Sep 17 00:00:00 2001 From: tyranron Date: Fri, 11 Aug 2023 12:36:47 +0300 Subject: [PATCH 1/2] Add `derive` module --- src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 8e02a91d..cf4fa490 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,6 +57,14 @@ pub mod __private { pub use crate::vendor::thiserror::aserror::AsDynError; } +/// Module containing macro definitions only, without corresponding traits. +/// +/// Use it in your import paths, if you don't want to import traits, but only macros. +pub mod derive { + #[doc(inline)] + pub use derive_more_impl::*; +} + // The modules containing error types and other helpers. #[cfg(feature = "add")] From eae039f06fc0dbd68f410120c6a60adb9791720f Mon Sep 17 00:00:00 2001 From: tyranron Date: Fri, 11 Aug 2023 12:41:24 +0300 Subject: [PATCH 2/2] Mention in CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16795055..50500826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ([#206](https://github.com/JelteF/derive_more/pull/206)) - Add support for container format in `Debug` derive with the same syntax as `Display` derives. ([#279](https://github.com/JelteF/derive_more/pull/279)) +- `derive_more::derive` module exporting only macros, without traits. ([#290](https://github.com/JelteF/derive_more/pull/290)) ### Changed