diff options
| author | ljedrz <ljedrz@gmail.com> | 2019-03-04 09:00:30 +0100 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2019-03-07 09:22:43 +0100 |
| commit | cd06038b54687bb4040e3d0a8b7bc4e8a3618ba8 (patch) | |
| tree | b7b357f82da07902f6d9ab586cfad6aaf7b12a13 /src/librustc_codegen_utils | |
| parent | 88f755f8a84df1d9e6b17cf10c96ae8b93481b2e (diff) | |
| download | rust-cd06038b54687bb4040e3d0a8b7bc4e8a3618ba8.tar.gz rust-cd06038b54687bb4040e3d0a8b7bc4e8a3618ba8.zip | |
HirIdification: replace NodeId method calls
Diffstat (limited to 'src/librustc_codegen_utils')
| -rw-r--r-- | src/librustc_codegen_utils/symbol_names.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_codegen_utils/symbol_names.rs b/src/librustc_codegen_utils/symbol_names.rs index 76e74e9e2b4..5de5c297c30 100644 --- a/src/librustc_codegen_utils/symbol_names.rs +++ b/src/librustc_codegen_utils/symbol_names.rs @@ -242,7 +242,7 @@ fn compute_symbol_name<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, instance: Instance debug!("symbol_name(def_id={:?}, substs={:?})", def_id, substs); - let node_id = tcx.hir().as_local_node_id(def_id); + let hir_id = tcx.hir().as_local_hir_id(def_id); if def_id.is_local() { if tcx.plugin_registrar_fn(LOCAL_CRATE) == Some(def_id) { @@ -256,8 +256,8 @@ fn compute_symbol_name<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, instance: Instance } // FIXME(eddyb) Precompute a custom symbol name based on attributes. - let is_foreign = if let Some(id) = node_id { - match tcx.hir().get(id) { + let is_foreign = if let Some(id) = hir_id { + match tcx.hir().get_by_hir_id(id) { Node::ForeignItem(_) => true, _ => false, } |
