diff options
| author | Ralf Jung <post@ralfj.de> | 2022-07-24 14:04:26 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-24 14:04:26 -0400 |
| commit | 890cd7a496b8002debead4b970bd2f24dcb9c014 (patch) | |
| tree | 1bc9dbdce55f7c08204622e3c6f9bb9ed167426a /compiler/rustc_const_eval/src/interpret/eval_context.rs | |
| parent | c32dcbba187d1ee0dbe92dc152cb9c2f3f42900c (diff) | |
| parent | 4e89a7c29325964182e0fb9f92539cf2d9f18e82 (diff) | |
| download | rust-890cd7a496b8002debead4b970bd2f24dcb9c014.tar.gz rust-890cd7a496b8002debead4b970bd2f24dcb9c014.zip | |
Rollup merge of #99644 - RalfJung:interpret-int-ptr-transmute, r=oli-obk
remove some provenance-related machine hooks that Miri no longer needs Then we can make `scalar_to_ptr` a method on `Scalar`. :) Fixes https://github.com/rust-lang/miri/issues/2188 r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/eval_context.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/eval_context.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/eval_context.rs b/compiler/rustc_const_eval/src/interpret/eval_context.rs index fdf243c4108..150d6589b08 100644 --- a/compiler/rustc_const_eval/src/interpret/eval_context.rs +++ b/compiler/rustc_const_eval/src/interpret/eval_context.rs @@ -629,7 +629,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { Ok(Some((size, align))) } ty::Dynamic(..) => { - let vtable = self.scalar_to_ptr(metadata.unwrap_meta())?; + let vtable = metadata.unwrap_meta().to_pointer(self)?; // Read size and align from vtable (already checks size). Ok(Some(self.get_vtable_size_and_align(vtable)?)) } |
