about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorludfo774 <79518686+ludfo774@users.noreply.github.com>2022-05-11 16:42:16 +0200
committerGitHub <noreply@github.com>2022-05-11 16:42:16 +0200
commitcdbfd3e01136948e2ca7947c6eb37914b296cb2d (patch)
treea2b56c299c25dc3538a83945c79854459ed2c1a7 /src
parenta85de162a513d1d11d263783a3f7092fff824b48 (diff)
downloadrust-cdbfd3e01136948e2ca7947c6eb37914b296cb2d.tar.gz
rust-cdbfd3e01136948e2ca7947c6eb37914b296cb2d.zip
Add test of matches macro for trailing commas
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/macros/macro-comma-support-rpass.rs6
1 files changed, 6 insertions, 0 deletions
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
@@ -193,6 +193,12 @@ fn 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!();
 }