Changed not_undef to check_init in foreign_items.rs

Due to changes from upstream, a commit using not_undef was inserted, which had to be updated to use check_init.

related issue #71193
This commit is contained in:
Philippe Nadon 2020-07-27 13:07:25 -06:00
parent 6282e92774
commit 6dd700fd17

View file

@ -200,7 +200,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
// Miri-specific extern functions
"miri_static_root" => {
let &[ptr] = check_arg_count(args)?;
let ptr = this.read_scalar(ptr)?.not_undef()?;
let ptr = this.read_scalar(ptr)?.check_init()?;
let ptr = this.force_ptr(ptr)?;
if ptr.offset != Size::ZERO {
throw_unsup_format!("pointer passed to miri_static_root must point to beginning of an allocated block");