diff options
| author | Strophox <strophox@gmail.com> | 2024-09-30 20:29:05 +0200 |
|---|---|---|
| committer | Strophox <strophox@gmail.com> | 2024-12-05 22:41:07 +0100 |
| commit | 712ceaba35967f4ebc272634f417b5f5400601f8 (patch) | |
| tree | 7df3db5ee48f22209208fb0044bc5365b4baea1c /compiler/rustc_const_eval/src/interpret/cast.rs | |
| parent | 5926e82dd1eae211c6e2ffe446de54df04798e89 (diff) | |
| download | rust-712ceaba35967f4ebc272634f417b5f5400601f8.tar.gz rust-712ceaba35967f4ebc272634f417b5f5400601f8.zip | |
extend Miri to correctly pass mutable pointers through FFI
Co-authored-by: Ralf Jung <post@ralfj.de>
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/cast.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/cast.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/cast.rs b/compiler/rustc_const_eval/src/interpret/cast.rs index 2d1bb5c9551..1ad3283383b 100644 --- a/compiler/rustc_const_eval/src/interpret/cast.rs +++ b/compiler/rustc_const_eval/src/interpret/cast.rs @@ -238,7 +238,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { let scalar = src.to_scalar(); let ptr = scalar.to_pointer(self)?; match ptr.into_pointer_or_addr() { - Ok(ptr) => M::expose_ptr(self, ptr)?, + Ok(ptr) => M::expose_provenance(self, ptr.provenance)?, Err(_) => {} // Do nothing, exposing an invalid pointer (`None` provenance) is a NOP. }; interp_ok(ImmTy::from_scalar( |
