about summary refs log tree commit diff
path: root/src/librustc_save_analysis/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_save_analysis/lib.rs')
-rw-r--r--src/librustc_save_analysis/lib.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs
index 21551eeddb9..c737c6257a2 100644
--- a/src/librustc_save_analysis/lib.rs
+++ b/src/librustc_save_analysis/lib.rs
@@ -412,7 +412,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
                         let trait_id = self.tcx.trait_id_of_impl(impl_id);
                         let mut docs = String::new();
                         let mut attrs = vec![];
-                        if let Some(Node::ImplItem(item)) = hir.find(hir.node_to_hir_id(id)) {
+                        if let Some(Node::ImplItem(item)) = hir.find(hir.node_id_to_hir_id(id)) {
                             docs = self.docs_for_attrs(&item.attrs);
                             attrs = item.attrs.to_vec();
                         }
@@ -452,7 +452,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
                 Some(def_id) => {
                     let mut docs = String::new();
                     let mut attrs = vec![];
-                    let hir_id = self.tcx.hir().node_to_hir_id(id);
+                    let hir_id = self.tcx.hir().node_id_to_hir_id(id);
 
                     if let Some(Node::TraitItem(item)) = self.tcx.hir().find(hir_id) {
                         docs = self.docs_for_attrs(&item.attrs);
@@ -511,7 +511,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
     }
 
     pub fn get_expr_data(&self, expr: &ast::Expr) -> Option<Data> {
-        let expr_hir_id = self.tcx.hir().node_to_hir_id(expr.id);
+        let expr_hir_id = self.tcx.hir().node_id_to_hir_id(expr.id);
         let hir_node = self.tcx.hir().expect_expr(expr_hir_id);
         let ty = self.tables.expr_ty_adjusted_opt(&hir_node);
         if ty.is_none() || ty.unwrap().kind == ty::Error {
@@ -519,7 +519,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
         }
         match expr.kind {
             ast::ExprKind::Field(ref sub_ex, ident) => {
-                let sub_ex_hir_id = self.tcx.hir().node_to_hir_id(sub_ex.id);
+                let sub_ex_hir_id = self.tcx.hir().node_id_to_hir_id(sub_ex.id);
                 let hir_node = match self.tcx.hir().find(sub_ex_hir_id) {
                     Some(Node::Expr(expr)) => expr,
                     _ => {
@@ -573,7 +573,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
                 }
             }
             ast::ExprKind::MethodCall(ref seg, ..) => {
-                let expr_hir_id = self.tcx.hir().definitions().node_to_hir_id(expr.id);
+                let expr_hir_id = self.tcx.hir().definitions().node_id_to_hir_id(expr.id);
                 let method_id = match self.tables.type_dependent_def_id(expr_hir_id) {
                     Some(id) => id,
                     None => {
@@ -605,7 +605,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
     }
 
     pub fn get_path_res(&self, id: NodeId) -> Res {
-        let hir_id = self.tcx.hir().node_to_hir_id(id);
+        let hir_id = self.tcx.hir().node_id_to_hir_id(id);
         match self.tcx.hir().get(hir_id) {
             Node::TraitRef(tr) => tr.path.res,
 
@@ -619,7 +619,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
                 Some(res) if res != Res::Err => res,
                 _ => {
                     let parent_node = self.tcx.hir().get_parent_node(hir_id);
-                    self.get_path_res(self.tcx.hir().hir_to_node_id(parent_node))
+                    self.get_path_res(self.tcx.hir().hir_id_to_node_id(parent_node))
                 }
             },
 
@@ -681,7 +681,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
             Res::Local(id) => Some(Ref {
                 kind: RefKind::Variable,
                 span,
-                ref_id: id_from_node_id(self.tcx.hir().hir_to_node_id(id), self),
+                ref_id: id_from_node_id(self.tcx.hir().hir_id_to_node_id(id), self),
             }),
             Res::Def(HirDefKind::Trait, def_id) if fn_type(path_seg) => {
                 Some(Ref { kind: RefKind::Type, span, ref_id: id_from_def_id(def_id) })