Skip to content

Commit

Permalink
another unsafe core proof workaround for trait resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurel300 committed Jul 29, 2022
1 parent e9e5c78 commit 280af36
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion prusti-interface/src/environment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,10 +523,18 @@ impl<'tcx> Environment<'tcx> {
called_def_id: ProcedureDefId, // what are we calling?
call_substs: SubstsRef<'tcx>,
) -> (ProcedureDefId, SubstsRef<'tcx>) {
use prusti_rustc_interface::middle::ty::TypeVisitable;

// Avoids a compiler-internal panic
// this check ignores any lifetimes/regions, which at this point would
// need inference. They are thus ignored.
if self.any_type_needs_infer(call_substs) {
// TODO: different behaviour used for unsafe core proof
let needs_infer = if config::unsafe_core_proof() {
call_substs.needs_infer()
} else {
self.any_type_needs_infer(call_substs)
};
if needs_infer {
return (called_def_id, call_substs);
}

Expand Down

0 comments on commit 280af36

Please sign in to comment.