about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/back
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2020-08-14 20:07:11 -0700
committerGitHub <noreply@github.com>2020-08-14 20:07:11 -0700
commit28b11abc2f336288379b6e635e65e23809616487 (patch)
treef0bf6a7d76e5b71e211ea1279229b9676fffda6b /src/librustc_codegen_ssa/back
parent29b6b5feaa86969dc97b42f72fe5837b0d8b523e (diff)
parentcd53760cc7751b65943feb6437af28d5ccb6e770 (diff)
downloadrust-28b11abc2f336288379b6e635e65e23809616487.tar.gz
rust-28b11abc2f336288379b6e635e65e23809616487.zip
Rollup merge of #75448 - lcnr:rn-as_local_hir_id, r=davidtwco
merge `as_local_hir_id` with `local_def_id_to_hir_id`

`as_local_hir_id` was defined as just calling `local_def_id_to_hir_id` and I think that having two different ways to call the same method is somewhat confusing.

Don't really care about which of these 2 methods we want to keep.

Does this require an MCP, considering that these methods are fairly frequently used?
Diffstat (limited to 'src/librustc_codegen_ssa/back')
-rw-r--r--src/librustc_codegen_ssa/back/symbol_export.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_codegen_ssa/back/symbol_export.rs b/src/librustc_codegen_ssa/back/symbol_export.rs
index e7c789ad210..87d7f00c703 100644
--- a/src/librustc_codegen_ssa/back/symbol_export.rs
+++ b/src/librustc_codegen_ssa/back/symbol_export.rs
@@ -361,7 +361,7 @@ fn upstream_drop_glue_for_provider<'tcx>(
 
 fn is_unreachable_local_definition_provider(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
     if let Some(def_id) = def_id.as_local() {
-        !tcx.reachable_set(LOCAL_CRATE).contains(&tcx.hir().as_local_hir_id(def_id))
+        !tcx.reachable_set(LOCAL_CRATE).contains(&tcx.hir().local_def_id_to_hir_id(def_id))
     } else {
         bug!("is_unreachable_local_definition called with non-local DefId: {:?}", def_id)
     }