We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e8bad53 + 0a2d0b1 commit ec80303Copy full SHA for ec80303
crates/hir-ty/src/tests/regression.rs
@@ -1802,3 +1802,21 @@ where
1802
"#,
1803
);
1804
}
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
1818
+ }
1819
1820
+}",
1821
+ );
1822
+}
0 commit comments