diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-07-05 10:03:42 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-07-06 10:35:57 +1000 |
| commit | b51169c178a535c8533d21be362c3c4e4d4f0cb7 (patch) | |
| tree | a0bf3fd04467e970e2892addc08a74557557c4aa /compiler/rustc_monomorphize/src | |
| parent | 22d4c798ece4f0c9c839325fe279140565a08957 (diff) | |
| download | rust-b51169c178a535c8533d21be362c3c4e4d4f0cb7.tar.gz rust-b51169c178a535c8533d21be362c3c4e4d4f0cb7.zip | |
Remove the field name from `MonoItemPlacement::SingleCgu`.
It's needless verbosity.
Diffstat (limited to 'compiler/rustc_monomorphize/src')
| -rw-r--r-- | compiler/rustc_monomorphize/src/partitioning.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_monomorphize/src/partitioning.rs b/compiler/rustc_monomorphize/src/partitioning.rs index 4abdce52088..fc4b22285ba 100644 --- a/compiler/rustc_monomorphize/src/partitioning.rs +++ b/compiler/rustc_monomorphize/src/partitioning.rs @@ -452,7 +452,7 @@ fn internalize_symbols<'tcx>( /// used to keep track of that. #[derive(Clone, PartialEq, Eq, Debug)] enum MonoItemPlacement { - SingleCgu { cgu_name: Symbol }, + SingleCgu(Symbol), MultipleCgus, } @@ -468,13 +468,13 @@ fn internalize_symbols<'tcx>( Entry::Occupied(e) => { let placement = e.into_mut(); debug_assert!(match *placement { - MonoItemPlacement::SingleCgu { cgu_name } => cgu_name != cgu.name(), + MonoItemPlacement::SingleCgu(cgu_name) => cgu_name != cgu.name(), MonoItemPlacement::MultipleCgus => true, }); *placement = MonoItemPlacement::MultipleCgus; } Entry::Vacant(e) => { - e.insert(MonoItemPlacement::SingleCgu { cgu_name: cgu.name() }); + e.insert(MonoItemPlacement::SingleCgu(cgu.name())); } } } @@ -484,7 +484,7 @@ fn internalize_symbols<'tcx>( // For each internalization candidates in each codegen unit, check if it is // used from outside its defining codegen unit. for cgu in codegen_units { - let home_cgu = MonoItemPlacement::SingleCgu { cgu_name: cgu.name() }; + let home_cgu = MonoItemPlacement::SingleCgu(cgu.name()); for (item, linkage_and_visibility) in cgu.items_mut() { if !internalization_candidates.contains(item) { |
