about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa
diff options
context:
space:
mode:
authormarmeladema <xademax@gmail.com>2020-04-09 09:43:00 +0100
committermarmeladema <xademax@gmail.com>2020-04-23 23:14:07 +0100
commit92fb59d7f37596f91b8d4619c4d146f273349b4c (patch)
tree7f0eb8b7afa4b4706a49181e504500fb9f3c70bd /src/librustc_codegen_ssa
parent14b15521c52549ebbb113173b4abecd124b5a823 (diff)
downloadrust-92fb59d7f37596f91b8d4619c4d146f273349b4c.tar.gz
rust-92fb59d7f37596f91b8d4619c4d146f273349b4c.zip
librustc_middle: return LocalDefId instead of DefId in local_def_id
Diffstat (limited to 'src/librustc_codegen_ssa')
-rw-r--r--src/librustc_codegen_ssa/back/symbol_export.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc_codegen_ssa/back/symbol_export.rs b/src/librustc_codegen_ssa/back/symbol_export.rs
index d5489ff9505..38a5f8d6d71 100644
--- a/src/librustc_codegen_ssa/back/symbol_export.rs
+++ b/src/librustc_codegen_ssa/back/symbol_export.rs
@@ -96,7 +96,7 @@ fn reachable_non_generics_provider(
                     if !generics.requires_monomorphization(tcx) &&
                         // Functions marked with #[inline] are only ever codegened
                         // with "internal" linkage and are never exported.
-                        !Instance::mono(tcx, def_id).def.generates_cgu_internal_copy(tcx)
+                        !Instance::mono(tcx, def_id.to_def_id()).def.generates_cgu_internal_copy(tcx)
                     {
                         Some(def_id)
                     } else {
@@ -109,7 +109,7 @@ fn reachable_non_generics_provider(
         })
         .map(|def_id| {
             let export_level = if special_runtime_crate {
-                let name = tcx.symbol_name(Instance::mono(tcx, def_id)).name.as_str();
+                let name = tcx.symbol_name(Instance::mono(tcx, def_id.to_def_id())).name.as_str();
                 // We can probably do better here by just ensuring that
                 // it has hidden visibility rather than public
                 // visibility, as this is primarily here to ensure it's
@@ -126,14 +126,14 @@ fn reachable_non_generics_provider(
                     SymbolExportLevel::Rust
                 }
             } else {
-                symbol_export_level(tcx, def_id)
+                symbol_export_level(tcx, def_id.to_def_id())
             };
             debug!(
                 "EXPORTED SYMBOL (local): {} ({:?})",
-                tcx.symbol_name(Instance::mono(tcx, def_id)),
+                tcx.symbol_name(Instance::mono(tcx, def_id.to_def_id())),
                 export_level
             );
-            (def_id, export_level)
+            (def_id.to_def_id(), export_level)
         })
         .collect();