From cdbfd3e01136948e2ca7947c6eb37914b296cb2d Mon Sep 17 00:00:00 2001 From: ludfo774 <79518686+ludfo774@users.noreply.github.com> Date: Wed, 11 May 2022 16:42:16 +0200 Subject: [PATCH] Add test of matches macro for trailing commas --- src/test/ui/macros/macro-comma-support-rpass.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/ui/macros/macro-comma-support-rpass.rs b/src/test/ui/macros/macro-comma-support-rpass.rs index f6c4f896d67..25b8c3cc62e 100644 --- a/src/test/ui/macros/macro-comma-support-rpass.rs +++ b/src/test/ui/macros/macro-comma-support-rpass.rs @@ -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!();