Bail out before running the query
This commit is contained in:
parent
b97abd0761
commit
2e66f85111
@ -40,15 +40,16 @@ impl<'mir, 'tcx> InterpCx<'mir, 'tcx, CompileTimeInterpreter<'mir, 'tcx>> {
|
||||
return Ok(false);
|
||||
}
|
||||
|
||||
let gid = GlobalId { instance, promoted: None };
|
||||
|
||||
let place = self.const_eval_raw(gid)?;
|
||||
let dest = match ret {
|
||||
Some((dest, _)) => dest,
|
||||
// Don't memoize diverging function calls.
|
||||
None => return Ok(false),
|
||||
};
|
||||
|
||||
let gid = GlobalId { instance, promoted: None };
|
||||
|
||||
let place = self.const_eval_raw(gid)?;
|
||||
|
||||
self.copy_op(place.into(), dest)?;
|
||||
|
||||
self.return_to_block(ret.map(|r| r.1))?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user