diff --git a/kani-compiler/src/kani_middle/transform/check_uninit/delayed_ub/instrumentation_visitor.rs b/kani-compiler/src/kani_middle/transform/check_uninit/delayed_ub/instrumentation_visitor.rs index 21fb3f42bc77..f57d9511c922 100644 --- a/kani-compiler/src/kani_middle/transform/check_uninit/delayed_ub/instrumentation_visitor.rs +++ b/kani-compiler/src/kani_middle/transform/check_uninit/delayed_ub/instrumentation_visitor.rs @@ -105,8 +105,8 @@ impl<'a, 'tcx> MirVisitor for InstrumentationVisitor<'a, 'tcx> { .points_to .follow_from_place(rustc_internal::internal(self.tcx, place), self.current_def_id) .intersection(&self.analysis_targets) - .count() - != 0 + .next() + .is_some() { // If we are mutating the place, initialize it. if ptx.is_mutating() {