about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-08-01 14:01:17 +0200
committerRalf Jung <post@ralfj.de>2024-08-01 15:49:25 +0200
commit6d312d7bd17598153c018e4879ccaa657eb48853 (patch)
treeda2168c13c157b8ba48190bc5b6591a76adf5888 /compiler/rustc_const_eval/src
parent70591dc15db32941fe3595fdbf98e58d6975f95e (diff)
downloadrust-6d312d7bd17598153c018e4879ccaa657eb48853.tar.gz
rust-6d312d7bd17598153c018e4879ccaa657eb48853.zip
MIR required_consts, mentioned_items: ensure we do not forget to fill these lists
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/interpret/eval_context.rs2
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 85f9b2341d9..9b4a437bf77 100644
--- a/compiler/rustc_const_eval/src/interpret/eval_context.rs
+++ b/compiler/rustc_const_eval/src/interpret/eval_context.rs
@@ -888,7 +888,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         body: &'tcx mir::Body<'tcx>,
     ) -> InterpResult<'tcx> {
         // Make sure all the constants required by this frame evaluate successfully (post-monomorphization check).
-        for &const_ in &body.required_consts {
+        for &const_ in body.required_consts() {
             let c =
                 self.instantiate_from_current_frame_and_normalize_erasing_regions(const_.const_)?;
             c.eval(*self.tcx, self.param_env, const_.span).map_err(|err| {