diff options
| author | Michael Goulet <michael@errs.io> | 2023-01-20 21:33:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-20 21:33:24 -0500 |
| commit | a4f0126bfa943bf946f3130a606d56141e245fa7 (patch) | |
| tree | 91868708db82c2664154c1bb06a893e39ba0195b /compiler/rustc_mir_transform/src/coverage/spans.rs | |
| parent | 7168aa5eb10e0c7e879b76152b659143015772ec (diff) | |
| parent | a641b929ad35e262ed6d0e0e275b291da26a588a (diff) | |
| download | rust-a4f0126bfa943bf946f3130a606d56141e245fa7.tar.gz rust-a4f0126bfa943bf946f3130a606d56141e245fa7.zip | |
Rollup merge of #107124 - DebugSteven:check-macro-expansion, r=albertlarsan68
fix check macro expansion
If the only argument to `check!` is the module name I get this error:
```
error: expected expression, found `,`
--> src/tools/tidy/src/main.rs:63:42
|
57 | / macro_rules! check {
58 | | ($p:ident $(, $args:expr)* ) => {
59 | | drain_handles(&mut handles);
60 | |
... |
63 | | $p::check($($args),* , &mut flag);
| | ^ expected expression
... |
69 | | }
70 | | }
| |_________- in this expansion of `check!`
...
117 | check!(hey);
| ----------- in this macro invocation
```
This change makes it so commas are added only when there are `args`.
r? ```@albertlarsan68```
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/spans.rs')
0 files changed, 0 insertions, 0 deletions
