@@ -410,7 +410,10 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
410410 let mut decl_id = None ;
411411 let mut docs = String :: new ( ) ;
412412 let mut attrs = vec ! [ ] ;
413- if let Some ( Node :: ImplItem ( item) ) = self . tcx . hir ( ) . find ( id) {
413+ let hir_id = self . tcx . hir ( ) . node_to_hir_id ( id) ;
414+ if let Some ( Node :: ImplItem ( item) ) =
415+ self . tcx . hir ( ) . find_by_hir_id ( hir_id)
416+ {
414417 docs = self . docs_for_attrs ( & item. attrs ) ;
415418 attrs = item. attrs . to_vec ( ) ;
416419 }
@@ -451,8 +454,9 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
451454 Some ( def_id) => {
452455 let mut docs = String :: new ( ) ;
453456 let mut attrs = vec ! [ ] ;
457+ let hir_id = self . tcx . hir ( ) . node_to_hir_id ( id) ;
454458
455- if let Some ( Node :: TraitItem ( item) ) = self . tcx . hir ( ) . find ( id ) {
459+ if let Some ( Node :: TraitItem ( item) ) = self . tcx . hir ( ) . find_by_hir_id ( hir_id ) {
456460 docs = self . docs_for_attrs ( & item. attrs ) ;
457461 attrs = item. attrs . to_vec ( ) ;
458462 }
@@ -521,7 +525,8 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
521525 }
522526 match expr. node {
523527 ast:: ExprKind :: Field ( ref sub_ex, ident) => {
524- let hir_node = match self . tcx . hir ( ) . find ( sub_ex. id ) {
528+ let sub_ex_hir_id = self . tcx . hir ( ) . node_to_hir_id ( sub_ex. id ) ;
529+ let hir_node = match self . tcx . hir ( ) . find_by_hir_id ( sub_ex_hir_id) {
525530 Some ( Node :: Expr ( expr) ) => expr,
526531 _ => {
527532 debug ! (
0 commit comments