diff options
| author | Ralf Jung <post@ralfj.de> | 2025-09-08 10:40:18 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-09-08 13:22:52 +0200 |
| commit | aed0ed4c93d661fc7b66dc4a39690948476e8a4a (patch) | |
| tree | defedf24675aa706b949f66950d41ac2ffa1fbc0 /compiler/rustc_const_eval | |
| parent | ebdf2abea4b46fcbba959eee1207c979c77dc95c (diff) | |
| download | rust-aed0ed4c93d661fc7b66dc4a39690948476e8a4a.tar.gz rust-aed0ed4c93d661fc7b66dc4a39690948476e8a4a.zip | |
const-eval: disable pointer fragment support
Diffstat (limited to 'compiler/rustc_const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/memory.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/memory.rs b/compiler/rustc_const_eval/src/interpret/memory.rs index 2c1e5087e1c..6ec85648d6d 100644 --- a/compiler/rustc_const_eval/src/interpret/memory.rs +++ b/compiler/rustc_const_eval/src/interpret/memory.rs @@ -1501,8 +1501,10 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { // `get_bytes_mut` will clear the provenance, which is correct, // since we don't want to keep any provenance at the target. // This will also error if copying partial provenance is not supported. - let provenance = - src_alloc.provenance().prepare_copy(src_range, dest_offset, num_copies, self); + let provenance = src_alloc + .provenance() + .prepare_copy(src_range, dest_offset, num_copies, self) + .map_err(|e| e.to_interp_error(src_alloc_id))?; // Prepare a copy of the initialization mask. let init = src_alloc.init_mask().prepare_copy(src_range); |
