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
This commit is contained in:
Matthias Krüger 2022-05-13 05:33:11 +02:00 committed by GitHub
commit 7debc95bab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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!();