File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2001,16 +2001,15 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
20012001 let PathSeg ( def_id, index) = path_segs. last ( ) . unwrap ( ) ;
20022002 self . ast_path_to_ty ( span, * def_id, & path. segments [ * index] )
20032003 }
2004- Res :: Def ( DefKind :: TyParam , did ) => {
2004+ Res :: Def ( DefKind :: TyParam , def_id ) => {
20052005 assert_eq ! ( opt_self_ty, None ) ;
20062006 self . prohibit_generics ( & path. segments ) ;
20072007
2008- let hir_id = tcx. hir ( ) . as_local_hir_id ( did ) . unwrap ( ) ;
2008+ let hir_id = tcx. hir ( ) . as_local_hir_id ( def_id ) . unwrap ( ) ;
20092009 let item_id = tcx. hir ( ) . get_parent_node_by_hir_id ( hir_id) ;
20102010 let item_def_id = tcx. hir ( ) . local_def_id_from_hir_id ( item_id) ;
20112011 let generics = tcx. generics_of ( item_def_id) ;
2012- let index = generics. param_def_id_to_index [
2013- & tcx. hir ( ) . local_def_id_from_hir_id ( hir_id) ] ;
2012+ let index = generics. param_def_id_to_index [ & def_id] ;
20142013 tcx. mk_ty_param ( index, tcx. hir ( ) . name_by_hir_id ( hir_id) . as_interned_str ( ) )
20152014 }
20162015 Res :: SelfTy ( Some ( _) , None ) => {
You can’t perform that action at this time.
0 commit comments