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 82b80a53e3..dfe082cb56 100644 --- a/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs +++ b/crates/hir-ty/src/diagnostics/match_check/pat_analysis.rs @@ -65,7 +65,9 @@ impl<'p> MatchCheckCtx<'p> { arms: &[MatchArm<'p>], scrut_ty: Ty, ) -> Result, ()> { - compute_match_usefulness(self, arms, scrut_ty, PlaceValidity::ValidOnly, None) + // FIXME: Determine place validity correctly. For now, err on the safe side. + let place_validity = PlaceValidity::MaybeInvalid; + compute_match_usefulness(self, arms, scrut_ty, place_validity, None) } fn is_uninhabited(&self, ty: &Ty) -> bool {