mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-04 07:35:49 +00:00
Add regression test for #10989
This commit is contained in:
parent
e8bad53d63
commit
0a2d0b15a1
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…
Add table
Add a link
Reference in a new issue