about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/back
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-07-14 16:32:10 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2023-07-17 08:44:48 +1000
commitb52f9eb6cabeb681d91bcfca44507721b71314aa (patch)
treecf79c349200a0c7cabf99b7f3e149686e33ca6c0 /compiler/rustc_codegen_ssa/src/back
parentc4083faade32b16feb471ef082ce0b1e3fe94262 (diff)
downloadrust-b52f9eb6cabeb681d91bcfca44507721b71314aa.tar.gz
rust-b52f9eb6cabeb681d91bcfca44507721b71314aa.zip
Introduce `MonoItemData`.
It replaces `(Linkage, Visibility)`, making the code nicer. Plus the
next commit will add another field.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/symbol_export.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs
index 406048bfe05..cbe7e519079 100644
--- a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs
+++ b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs
@@ -328,14 +328,14 @@ fn exported_symbols_provider_local(
 
         let (_, cgus) = tcx.collect_and_partition_mono_items(());
 
-        for (mono_item, &(linkage, visibility)) in cgus.iter().flat_map(|cgu| cgu.items().iter()) {
-            if linkage != Linkage::External {
+        for (mono_item, data) in cgus.iter().flat_map(|cgu| cgu.items().iter()) {
+            if data.linkage != Linkage::External {
                 // We can only re-use things with external linkage, otherwise
                 // we'll get a linker error
                 continue;
             }
 
-            if need_visibility && visibility == Visibility::Hidden {
+            if need_visibility && data.visibility == Visibility::Hidden {
                 // If we potentially share things from Rust dylibs, they must
                 // not be hidden
                 continue;