Skip to content

Commit 127a4ef

Browse files
committed
always check for mixed deref pattern and normal constructors
This makes it work for box patterns and in rust-analyzer.
1 parent 849b884 commit 127a4ef

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,14 @@ impl PatCx for MatchCheckCtx<'_> {
527527
fn complexity_exceeded(&self) -> Result<(), Self::Error> {
528528
Err(())
529529
}
530+
531+
fn report_mixed_deref_pat_ctors(
532+
&self,
533+
_deref_pat: &DeconstructedPat<'_>,
534+
_normal_pat: &DeconstructedPat<'_>,
535+
) {
536+
// FIXME(deref_patterns): This could report an error comparable to the one in rustc.
537+
}
530538
}
531539

532540
impl fmt::Debug for MatchCheckCtx<'_> {

0 commit comments

Comments
 (0)