rust/compiler
Yuki Okushi 0716724a0b
Rollup merge of #78376 - Aaron1011:feature/consistent-empty-expr, r=petrochenkov
Treat trailing semicolon as a statement in macro call

See #61733 (comment)

We now preserve the trailing semicolon in a macro invocation, even if
the macro expands to nothing. As a result, the following code no longer
compiles:

```rust
macro_rules! empty {
    () => { }
}

fn foo() -> bool { //~ ERROR mismatched
    { true } //~ ERROR mismatched
    empty!();
}
```

Previously, `{ true }` would be considered the trailing expression, even
though there's a semicolon in `empty!();`

This makes macro expansion more token-based.
2020-11-03 15:27:03 +09:00
..
2020-10-30 10:13:39 -04:00
2020-10-29 16:51:46 +01:00
2020-10-30 10:13:39 -04:00
2020-10-30 20:02:14 -04:00
2020-10-30 10:13:39 -04:00
2020-10-30 12:27:47 +01:00
2020-10-30 10:13:41 -04:00
2020-11-02 16:59:11 +09:00