Skip to content

Commit

Permalink
Fix code actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Salzberg committed Aug 26, 2024
1 parent 3376a93 commit dc332a7
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions kani-compiler/src/kani_middle/transform/check_aliasing/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,15 @@ impl<'locals> CollectActions<'locals> {
return;
}
};
match place.ty(self.locals).unwrap().kind() {
TyKind::RigidTy(RigidTy::Ref(_, ty, _)) => {
self.actions.push(Action::StackUpdateReference { place: place.local, ty });
self.actions.push(Action::StackCheck);
}
TyKind::RigidTy(RigidTy::RawPtr(ty, _)) => {
self.actions.push(Action::StackUpdatePointer { place: place.local, ty });
self.actions.push(Action::StackCheck);
}
_ => {}
if self.locals[place.local].ty.kind().is_ref() {
let ty = place.ty(self.locals).unwrap();
self.actions.push(Action::StackUpdateReference { place: place.local, ty });
self.actions.push(Action::StackCheck);
}
if self.locals[place.local].ty.kind().is_raw_ptr() {
let ty = place.ty(self.locals).unwrap();
self.actions.push(Action::StackUpdatePointer { place: place.local, ty });
self.actions.push(Action::StackCheck);
}
}

Expand Down

0 comments on commit dc332a7

Please sign in to comment.