Skip to content

Commit e26c0c9

Browse files
committed
Inline and remove numbered_codegen_unit_name.
It is small and has a single call site, and this change will facilitate the next commit.
1 parent 8b4b208 commit e26c0c9

File tree

1 file changed

+3
-8
lines changed
  • compiler/rustc_monomorphize/src/partitioning

1 file changed

+3
-8
lines changed

compiler/rustc_monomorphize/src/partitioning/merging.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,9 @@ pub fn merge_codegen_units<'tcx>(
9898
// If we are compiling non-incrementally we just generate simple CGU
9999
// names containing an index.
100100
for (index, cgu) in codegen_units.iter_mut().enumerate() {
101-
cgu.set_name(numbered_codegen_unit_name(cgu_name_builder, index));
101+
let numbered_codegen_unit_name =
102+
cgu_name_builder.build_cgu_name_no_mangle(LOCAL_CRATE, &["cgu"], Some(index));
103+
cgu.set_name(numbered_codegen_unit_name);
102104
}
103105
}
104106
}
105-
106-
fn numbered_codegen_unit_name(
107-
name_builder: &mut CodegenUnitNameBuilder<'_>,
108-
index: usize,
109-
) -> Symbol {
110-
name_builder.build_cgu_name_no_mangle(LOCAL_CRATE, &["cgu"], Some(index))
111-
}

0 commit comments

Comments
 (0)