diff options
| author | bors <bors@rust-lang.org> | 2025-09-09 11:54:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-09-09 11:54:44 +0000 |
| commit | be8de5d6a0fc5cb2924e174a809a0aff303f281a (patch) | |
| tree | b1218d6790f8d94203218bfb65c72af7a8b42a65 /compiler/rustc_const_eval | |
| parent | fefce3cecd63cebf2d7c9aa3dd90a84379fcfa1a (diff) | |
| parent | 8b9ea589fbfeb073d0ca5bab450cd89050eac5e4 (diff) | |
| download | rust-be8de5d6a0fc5cb2924e174a809a0aff303f281a.tar.gz rust-be8de5d6a0fc5cb2924e174a809a0aff303f281a.zip | |
Auto merge of #146360 - Zalathar:rollup-qc2hhrd, r=Zalathar
Rollup of 11 pull requests Successful merges: - rust-lang/rust#139593 (add sitemap to rust docs) - rust-lang/rust#145819 (Port limit attributes to the new attribute parsing infrastructure) - rust-lang/rust#146025 (compiler: Include span of too huge array with `-Cdebuginfo=2`) - rust-lang/rust#146184 (In the rustc_llvm build script, don't consider arm64* to be 32-bit) - rust-lang/rust#146195 (fix partial urlencoded link support) - rust-lang/rust#146300 (Implement `Sum` and `Product` for `f16` and `f128`.) - rust-lang/rust#146314 (mark `format_args_nl!` as `#[doc(hidden)]`) - rust-lang/rust#146324 (const-eval: disable pointer fragment support) - rust-lang/rust#146326 (simplify the declaration of the legacy integer modules (`std::u32` etc.)) - rust-lang/rust#146339 (Update books) - rust-lang/rust#146343 (Weakly export `platform_version` symbols) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/eval_context.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/memory.rs | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/eval_context.rs b/compiler/rustc_const_eval/src/interpret/eval_context.rs index 9681d89ce35..91ed71ac3e5 100644 --- a/compiler/rustc_const_eval/src/interpret/eval_context.rs +++ b/compiler/rustc_const_eval/src/interpret/eval_context.rs @@ -4,6 +4,7 @@ use either::{Left, Right}; use rustc_abi::{Align, HasDataLayout, Size, TargetDataLayout}; use rustc_errors::DiagCtxtHandle; use rustc_hir::def_id::DefId; +use rustc_hir::limit::Limit; use rustc_middle::mir::interpret::{ErrorHandled, InvalidMetaKind, ReportedErrorInfo}; use rustc_middle::query::TyCtxtAt; use rustc_middle::ty::layout::{ @@ -12,7 +13,6 @@ use rustc_middle::ty::layout::{ }; use rustc_middle::ty::{self, GenericArgsRef, Ty, TyCtxt, TypeFoldable, TypingEnv, Variance}; use rustc_middle::{mir, span_bug}; -use rustc_session::Limit; use rustc_span::Span; use rustc_target::callconv::FnAbi; use tracing::{debug, trace}; 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); |
