Allow macro-expanded macros in trailing expression positions to expand into statements:
```rust
macro_rules! m { () => { let x = 1; x } }
macro_rules! n { () => {
m!() //< This can now expand into statements
}}
fn main() { n!(); }
```
and revert needless fallout fixes.
This commit is contained in:
parent
52d485fe0d
commit
759b8a8e7d
2 changed files with 3 additions and 2 deletions
|
|
@ -113,7 +113,7 @@ fn main() {
|
|||
// product macro
|
||||
($from: ident $(, $from_: ident)*: $($to: ident),*) => {
|
||||
fn $from() { unsafe { $( test!($from, $to); )* } }
|
||||
tests!($($from_),*: $($to),*);
|
||||
tests!($($from_),*: $($to),*)
|
||||
};
|
||||
($($types: ident),*) => {{
|
||||
tests!($($types),* : $($types),*);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue