From c52f381a0bae44da5fcca290dadc49075d8ab6ed Mon Sep 17 00:00:00 2001 From: daxpedda Date: Thu, 15 May 2025 23:17:34 +0200 Subject: [PATCH] Document why we re-direct to a derive macro --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index a62b3087..13a4109e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -568,6 +568,9 @@ fn derive_where_internal(mut item: DeriveInput) -> Result { Ok(output) } +/// Internally we re-direct the attribute macro to the derive macro. Unlike the +/// attribute macro, the derive macro supports helper attributes and evaluates +/// `cfg`s. #[doc(hidden)] #[proc_macro_derive(DeriveWhere, attributes(derive_where))] #[cfg_attr(feature = "nightly", allow_internal_unstable(core_intrinsics))]