Skip to content

Commit ec80303

Browse files
committed
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
2 parents e8bad53 + 0a2d0b1 commit ec80303

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

crates/hir-ty/src/tests/regression.rs

+18
Original file line numberDiff line numberDiff line change
@@ -1802,3 +1802,21 @@ where
18021802
"#,
18031803
);
18041804
}
1805+
1806+
#[test]
1807+
fn match_ergonomics_with_binding_modes_interaction() {
1808+
check_types(
1809+
r"
1810+
enum E { A }
1811+
fn foo() {
1812+
match &E::A {
1813+
b @ (x @ E::A | x) => {
1814+
b;
1815+
//^ &E
1816+
x;
1817+
//^ &E
1818+
}
1819+
}
1820+
}",
1821+
);
1822+
}

0 commit comments

Comments
 (0)