diff --git a/c2rust-analyze/src/dataflow/type_check.rs b/c2rust-analyze/src/dataflow/type_check.rs index fa7647e36..0a6a2e5aa 100644 --- a/c2rust-analyze/src/dataflow/type_check.rs +++ b/c2rust-analyze/src/dataflow/type_check.rs @@ -102,6 +102,7 @@ impl<'tcx> TypeChecker<'tcx, '_> { } fn pointee_type(&self, ptr: PointerId) -> Option> { + assert!(!ptr.is_none()); self.pointee_types .as_ref() .and_then(|pointee_types| pointee_types[ptr].get_sole_lty())