Commit 02cc956
29: Macro Statements should be also an Expr r=jonas-schievink a=edwin0cheng
e.g:
```rust
macro_rules! identity { ($($es:tt)*) => { $($es)* } }
fn main() -> usize {
identity! { let _ = (); } // statements
identity! { let _ = (); 0 } // expr, return 0
}
```
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2 files changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
| |||
0 commit comments