Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide_diagnostics/src/handlers/missing_match_arms.rs')
| -rw-r--r-- | crates/ide_diagnostics/src/handlers/missing_match_arms.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/ide_diagnostics/src/handlers/missing_match_arms.rs b/crates/ide_diagnostics/src/handlers/missing_match_arms.rs index 5ef4d2a226..6e2764e59f 100644 --- a/crates/ide_diagnostics/src/handlers/missing_match_arms.rs +++ b/crates/ide_diagnostics/src/handlers/missing_match_arms.rs @@ -883,7 +883,20 @@ static __: () = { match &n { Next(E::Foo | E::Bar) => {} } match &n { _ | Next(E::Bar) => {} } };", + ); + } + #[test] + fn binding_mode_by_ref() { + check_diagnostics_no_bails( + r" +enum E{ A, B } +fn foo() { + match &E::A { + E::A => {} + x => {} + } +}", ); } |