removing assert that can cause crashes

This commit is contained in:
Jakub Doka 2024-11-11 09:07:36 +01:00
parent 3c35557872
commit b2eefa5b83
No known key found for this signature in database
GPG key ID: C6E9A89936B8C143

View file

@ -4670,13 +4670,7 @@ impl TypeParser for Codegen<'_> {
} }
fn find_local_ty(&mut self, ident: Ident) -> Option<ty::Id> { fn find_local_ty(&mut self, ident: Ident) -> Option<ty::Id> {
self.ci self.ci.scope.vars.iter().rfind(|v| (v.id == ident && v.value() == NEVER)).map(|v| v.ty)
.scope
.vars
.iter()
.rfind(|v| (v.id == ident && v.value() == NEVER))
.map(|v| v.ty)
.inspect(|&ty| debug_assert_ne!(ty, ty::Id::NEVER))
} }
} }