Unnamed repository; edit this file 'description' to name the repository.
always check for mixed deref pattern and normal constructors
This makes it work for box patterns and in rust-analyzer.
dianne 10 months ago
parent 849b884 · commit 127a4ef
-rw-r--r--crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs b/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs
index 7cf22c64d0..2e408b1fac 100644
--- a/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs
+++ b/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs
@@ -527,6 +527,14 @@ impl PatCx for MatchCheckCtx<'_> {
fn complexity_exceeded(&self) -> Result<(), Self::Error> {
Err(())
}
+
+ fn report_mixed_deref_pat_ctors(
+ &self,
+ _deref_pat: &DeconstructedPat<'_>,
+ _normal_pat: &DeconstructedPat<'_>,
+ ) {
+ // FIXME(deref_patterns): This could report an error comparable to the one in rustc.
+ }
}
impl fmt::Debug for MatchCheckCtx<'_> {