Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit ec80303

Browse files
committed
Auto merge of rust-lang#14494 - lowr:patch/regression-test-for-10989, r=HKalbasi
Add regression test for rust-lang#10989 rust-lang#10989 seems to have been fixed. This patch merely adds a regression test. Closes rust-lang#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

Lines changed: 18 additions & 0 deletions
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)