Skip to content

Commit 7debc95

Browse files
authored
Rollup merge of rust-lang#96948 - ludfo774:macro-trailing-comma-test, 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
2 parents f38b7ff + cdbfd3e commit 7debc95

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/test/ui/macros/macro-comma-support-rpass.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ fn line() {
192192
let _ = line!();
193193
}
194194

195+
#[test]
196+
fn matches() {
197+
let _ = matches!(1, x if x > 0);
198+
let _ = matches!(1, x if x > 0,);
199+
}
200+
195201
#[test]
196202
fn module_path() {
197203
let _ = module_path!();

0 commit comments

Comments
 (0)