Skip to content

Commit

Permalink
Revert running Polonius on all bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasAlaif committed Jul 10, 2023
1 parent 79b313a commit afb7010
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions prusti/src/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::verifier::verify;
use prusti_common::config;
use prusti_interface::{
environment::{mir_storage, Environment},
specs::{self, cross_crate::CrossCrateSpecs},
specs::{self, cross_crate::CrossCrateSpecs, is_spec_fn},
};
use prusti_rustc_interface::{
borrowck::consumers,
Expand Down Expand Up @@ -32,11 +32,12 @@ fn mir_borrowck<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> &BorrowCheckResu
// when calling `get_body_with_borrowck_facts`. TODO: figure out if we need
// (anon) const bodies at all, and if so, how to get them?
if !is_anon_const {
let body_with_facts = consumers::get_body_with_borrowck_facts(
tcx,
def_id,
consumers::ConsumerOptions::PoloniusOutputFacts,
);
let consumer_opts = if is_spec_fn(tcx, def_id.to_def_id()) || config::no_verify() {
consumers::ConsumerOptions::RegionInferenceContext
} else {
consumers::ConsumerOptions::PoloniusOutputFacts
};
let body_with_facts = consumers::get_body_with_borrowck_facts(tcx, def_id, consumer_opts);
// SAFETY: This is safe because we are feeding in the same `tcx` that is
// going to be used as a witness when pulling out the data.
unsafe {
Expand Down

0 comments on commit afb7010

Please sign in to comment.