diff --git a/src/test/ui/matches2021.rs b/src/test/ui/matches2021.rs new file mode 100644 index 00000000000..1090b1578ba --- /dev/null +++ b/src/test/ui/matches2021.rs @@ -0,0 +1,12 @@ +// run-pass +// edition:2021 +// compile-flags: -Zunstable-options + +// regression test for https://github.com/rust-lang/rust/pull/85678 + +#![feature(assert_matches)] + +fn main() { + assert!(matches!((), ())); + assert_matches!((), ()); +}