Skip to content

Commit 5b71aa0

Browse files
authored
Add derive module (#290)
Resolves #259 (comment) Add `derive_more::derive` module, re-exporting macros only.
1 parent 334df59 commit 5b71aa0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
5252
([#206](https://github.com/JelteF/derive_more/pull/206))
5353
- Add support for container format in `Debug` derive with the same syntax as `Display` derives.
5454
([#279](https://github.com/JelteF/derive_more/pull/279))
55+
- `derive_more::derive` module exporting only macros, without traits. ([#290](https://github.com/JelteF/derive_more/pull/290))
5556

5657
### Changed
5758

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ pub mod __private {
5757
pub use crate::vendor::thiserror::aserror::AsDynError;
5858
}
5959

60+
/// Module containing macro definitions only, without corresponding traits.
61+
///
62+
/// Use it in your import paths, if you don't want to import traits, but only macros.
63+
pub mod derive {
64+
#[doc(inline)]
65+
pub use derive_more_impl::*;
66+
}
67+
6068
// The modules containing error types and other helpers.
6169

6270
#[cfg(feature = "add")]

0 commit comments

Comments
 (0)