]> git.lizzy.rs Git - rust.git/commitdiff
Changed not_undef to check_init in foreign_items.rs
authorPhilippe Nadon <phil@nadon.io>
Mon, 27 Jul 2020 19:07:25 +0000 (13:07 -0600)
committerPhilippe Nadon <phil@nadon.io>
Mon, 27 Jul 2020 19:07:25 +0000 (13:07 -0600)
Due to changes from upstream, a commit using not_undef was inserted, which had to be updated to use check_init.

related issue #71193

src/shims/foreign_items.rs

index d4f248f0329dc717c685cad010e897eb773ae53e..98e66db92da3c1d17d5956b6f28cde6029aad9ef 100644 (file)
@@ -200,7 +200,7 @@ fn emulate_foreign_item_by_name(
             // 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");