Skip to content

Commit 7debc95

Browse files
authored
Rollup merge of #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 #46238
2 parents f38b7ff + cdbfd3e commit 7debc95

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

+6
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)