diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-08-02 06:43:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-02 06:43:44 +0200 |
| commit | 66d243f61b35391b4fc36976596a616a927c201a (patch) | |
| tree | 1469549de4cf9c428b1468a83d6c842d3f5f373c /compiler/rustc_const_eval/src/interpret/eval_context.rs | |
| parent | 55ed05cbac0a282269c9ab6683f135f0277877c9 (diff) | |
| parent | 6d312d7bd17598153c018e4879ccaa657eb48853 (diff) | |
| download | rust-66d243f61b35391b4fc36976596a616a927c201a.tar.gz rust-66d243f61b35391b4fc36976596a616a927c201a.zip | |
Rollup merge of #128494 - RalfJung:mir-lazy-lists, r=compiler-errors
MIR required_consts, mentioned_items: ensure we do not forget to fill these lists Bodies initially get created with empty required_consts and mentioned_items, but at some point those should be filled. Make sure we notice when that is forgotten.
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 fc063b8bab0..18d585e4a7a 100644 --- a/compiler/rustc_const_eval/src/interpret/eval_context.rs +++ b/compiler/rustc_const_eval/src/interpret/eval_context.rs @@ -877,7 +877,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| { |
