From b2eefa5b8330c3a65c8a675b6520af44c073e0da Mon Sep 17 00:00:00 2001 From: Jakub Doka Date: Mon, 11 Nov 2024 09:07:36 +0100 Subject: [PATCH] removing assert that can cause crashes --- lang/src/son.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lang/src/son.rs b/lang/src/son.rs index c45179e..cd8f684 100644 --- a/lang/src/son.rs +++ b/lang/src/son.rs @@ -4670,13 +4670,7 @@ impl TypeParser for Codegen<'_> { } fn find_local_ty(&mut self, ident: Ident) -> Option { - self.ci - .scope - .vars - .iter() - .rfind(|v| (v.id == ident && v.value() == NEVER)) - .map(|v| v.ty) - .inspect(|&ty| debug_assert_ne!(ty, ty::Id::NEVER)) + self.ci.scope.vars.iter().rfind(|v| (v.id == ident && v.value() == NEVER)).map(|v| v.ty) } }