From 5b71aa01f761742465951f3feb07604e01331482 Mon Sep 17 00:00:00 2001 From: Kai Ren Date: Sun, 13 Aug 2023 17:56:44 +0300 Subject: [PATCH] Add `derive` module (#290) Resolves https://github.com/JelteF/derive_more/issues/259#issuecomment-1673947234 Add `derive_more::derive` module, re-exporting macros only. --- CHANGELOG.md | 1 + src/lib.rs | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 694012e0..51133030 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 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")]