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 | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/crates/ide-diagnostics/src/handlers/missing_match_arms.rs b/crates/ide-diagnostics/src/handlers/missing_match_arms.rs index d52fc73870..8cd41f7aed 100644 --- a/crates/ide-diagnostics/src/handlers/missing_match_arms.rs +++ b/crates/ide-diagnostics/src/handlers/missing_match_arms.rs @@ -300,7 +300,7 @@ fn main() { } match (true, false) { (true, false, true) => (), - //^^^^^^^^^^^^^^^^^^^ error: expected (bool, bool), found (bool, bool, bool) + //^^^^^^^^^^^^^^^^^^^ error: expected (bool, bool), found (bool, bool, {unknown}) (true) => (), // ^^^^ error: expected (bool, bool), found bool } @@ -1198,4 +1198,20 @@ fn main() { ); } } + + #[test] + fn no_overloaded_deref_is_not_projection() { + check_diagnostics( + r#" +const FOO: &str = ""; + +fn foo() { + match "" { + FOO => {} + _ => {} + } +} + "#, + ); + } } |