From 974518fde7975b839ed4ccd4c5ce1d48cd6db3c7 Mon Sep 17 00:00:00 2001 From: Zac Pullar-Strecker Date: Tue, 1 Sep 2020 20:26:10 +1200 Subject: Code reorganisation and field support --- crates/stdx/src/macros.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crates/stdx/src') diff --git a/crates/stdx/src/macros.rs b/crates/stdx/src/macros.rs index bf298460f..f5ee3484b 100644 --- a/crates/stdx/src/macros.rs +++ b/crates/stdx/src/macros.rs @@ -18,7 +18,13 @@ macro_rules! format_to { }; } -// Generates `From` impls for `Enum E { Foo(Foo), Bar(Bar) }` enums +/// Generates `From` impls for `Enum E { Foo(Foo), Bar(Bar) }` enums +/// +/// # Example +/// +/// ```rust +/// impl_from!(Struct, Union, Enum for Adt); +/// ``` #[macro_export] macro_rules! impl_from { ($($variant:ident $(($($sub_variant:ident),*))?),* for $enum:ident) => { -- cgit v1.2.3