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 {
2001
2001
let PathSeg ( def_id, index) = path_segs. last ( ) . unwrap ( ) ;
2002
2002
self . ast_path_to_ty ( span, * def_id, & path. segments [ * index] )
2003
2003
}
2004
- Res :: Def ( DefKind :: TyParam , did ) => {
2004
+ Res :: Def ( DefKind :: TyParam , def_id ) => {
2005
2005
assert_eq ! ( opt_self_ty, None ) ;
2006
2006
self . prohibit_generics ( & path. segments ) ;
2007
2007
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 ( ) ;
2009
2009
let item_id = tcx. hir ( ) . get_parent_node_by_hir_id ( hir_id) ;
2010
2010
let item_def_id = tcx. hir ( ) . local_def_id_from_hir_id ( item_id) ;
2011
2011
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] ;
2014
2013
tcx. mk_ty_param ( index, tcx. hir ( ) . name_by_hir_id ( hir_id) . as_interned_str ( ) )
2015
2014
}
2016
2015
Res :: SelfTy ( Some ( _) , None ) => {
You can’t perform that action at this time.
0 commit comments