From 6c80e0240d89eb425467f825e448cba4d1f6bbfa Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 5 Jul 2023 07:30:43 +1000 Subject: [PATCH] Use `iter()` instead of `iter_mut()` in one place. --- compiler/rustc_monomorphize/src/partitioning.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_monomorphize/src/partitioning.rs b/compiler/rustc_monomorphize/src/partitioning.rs index 14d5e068638..4abdce52088 100644 --- a/compiler/rustc_monomorphize/src/partitioning.rs +++ b/compiler/rustc_monomorphize/src/partitioning.rs @@ -460,7 +460,7 @@ fn internalize_symbols<'tcx>( let single_codegen_unit = codegen_units.len() == 1; if !single_codegen_unit { - for cgu in codegen_units.iter_mut() { + for cgu in codegen_units.iter() { for item in cgu.items().keys() { // If there is more than one codegen unit, we need to keep track // in which codegen units each monomorphization is placed.