Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #14494 - lowr:patch/regression-test-for-10989, r=HKalbasi
Add regression test for #10989 #10989 seems to have been fixed. This patch merely adds a regression test. Closes #10989
bors 2023-04-06
parent e8bad53 · parent 0a2d0b1 · commit ec80303
-rw-r--r--crates/hir-ty/src/tests/regression.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tests/regression.rs b/crates/hir-ty/src/tests/regression.rs
index 8911dd318c..35a06fcf61 100644
--- a/crates/hir-ty/src/tests/regression.rs
+++ b/crates/hir-ty/src/tests/regression.rs
@@ -1802,3 +1802,21 @@ where
"#,
);
}
+
+#[test]
+fn match_ergonomics_with_binding_modes_interaction() {
+ check_types(
+ r"
+enum E { A }
+fn foo() {
+ match &E::A {
+ b @ (x @ E::A | x) => {
+ b;
+ //^ &E
+ x;
+ //^ &E
+ }
+ }
+}",
+ );
+}