Skip to content

Commit

Permalink
Rollup merge of rust-lang#96948 - ludfo774:macro-trailing-comma-test,…
Browse files Browse the repository at this point in the history
… r=joshtriplett

Add test of matches macro for trailing commas

Almost all macros are tested for trailing commas.
The macro matches! was however not tested.
This PR adds that test case.
Related to rust-lang#46238
  • Loading branch information
matthiaskrgr authored May 13, 2022
2 parents f38b7ff + cdbfd3e commit 7debc95
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/ui/macros/macro-comma-support-rpass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ fn line() {
let _ = line!();
}

#[test]
fn matches() {
let _ = matches!(1, x if x > 0);
let _ = matches!(1, x if x > 0,);
}

#[test]
fn module_path() {
let _ = module_path!();
Expand Down

0 comments on commit 7debc95

Please sign in to comment.