mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Don't assume place validity when we don't know
This commit is contained in:
parent
3cfcd4ed96
commit
e67adf40c9
1 changed files with 3 additions and 1 deletions
|
@ -65,7 +65,9 @@ impl<'p> MatchCheckCtx<'p> {
|
|||
arms: &[MatchArm<'p>],
|
||||
scrut_ty: Ty,
|
||||
) -> Result<UsefulnessReport<'p, Self>, ()> {
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue