Skip to content

Commit

Permalink
A random change to see whether crashes are fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
vakaras committed Jul 20, 2023
1 parent dd004ba commit 5486c19
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion prusti-interface/src/environment/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,18 @@ impl<'tcx> EnvBody<'tcx> {

/// Get the MIR body of a local impure function, monomorphised
/// with the given type substitutions.
///
/// FIXME: This function is called only in pure contexts???
pub fn get_impure_fn_body(&self, def_id: LocalDefId, substs: SubstsRef<'tcx>) -> MirBody<'tcx> {
if let Some(body) = self.get_monomorphised(def_id.to_def_id(), substs, None) {
return body;
}
let body = self.get_impure_fn_body_identity(def_id);
// let body = self.get_impure_fn_body_identity(def_id);
let body = if let Some(body) = self.pure_fns.local.get(&def_id) {
body.clone()
} else {
Self::load_local_mir(self.tcx, def_id)
};
self.set_monomorphised(def_id.to_def_id(), substs, None, body)
}

Expand Down

0 comments on commit 5486c19

Please sign in to comment.