diff options
| author | Ralf Jung <post@ralfj.de> | 2024-08-01 14:01:17 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-08-01 15:49:25 +0200 |
| commit | 6d312d7bd17598153c018e4879ccaa657eb48853 (patch) | |
| tree | da2168c13c157b8ba48190bc5b6591a76adf5888 /compiler/rustc_monomorphize | |
| parent | 70591dc15db32941fe3595fdbf98e58d6975f95e (diff) | |
| download | rust-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_monomorphize')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 99cac67f5b1..df2abf6dc9c 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -1229,7 +1229,7 @@ fn collect_items_of_instance<'tcx>( // Always visit all `required_consts`, so that we evaluate them and abort compilation if any of // them errors. - for const_op in &body.required_consts { + for const_op in body.required_consts() { if let Some(val) = collector.eval_constant(const_op) { collect_const_value(tcx, val, mentioned_items); } @@ -1237,7 +1237,7 @@ fn collect_items_of_instance<'tcx>( // Always gather mentioned items. We try to avoid processing items that we have already added to // `used_items` above. - for item in &body.mentioned_items { + for item in body.mentioned_items() { if !collector.used_mentioned_items.contains(&item.node) { let item_mono = collector.monomorphize(item.node); visit_mentioned_item(tcx, &item_mono, item.span, mentioned_items); |
