mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-04 02:39:32 +00:00
Code reorganisation and field support
This commit is contained in:
parent
a14194b428
commit
974518fde7
6 changed files with 105 additions and 60 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue