mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-14 17:07:26 +00:00
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
This commit is contained in:
commit
ec803031fd
1 changed files with 18 additions and 0 deletions
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue