@@ -1774,7 +1774,7 @@ impl<'a, 'tcx> VarVisitor<'a, 'tcx> {
17741774 }
17751775 let res = self . cx. tables. qpath_res( seqpath, seqexpr. hir_id) ;
17761776 match res {
1777- Res :: Local ( hir_id) | Res :: Def ( Res :: Upvar ( .. ) , hir_id, ..) => {
1777+ Res :: Local ( hir_id) | Res :: Upvar ( hir_id, ..) => {
17781778 let parent_id = self . cx. tcx. hir( ) . get_parent_item( expr. hir_id) ;
17791779 let parent_def_id = self . cx. tcx. hir( ) . local_def_id_from_hir_id( parent_id) ;
17801780 let extent = self . cx. tcx. region_scope_tree( parent_def_id) . var_scope( hir_id. local_id) ;
@@ -1835,7 +1835,7 @@ impl<'a, 'tcx> Visitor<'tcx> for VarVisitor<'a, 'tcx> {
18351835 if path. segments. len( ) == 1 ;
18361836 then {
18371837 match self . cx. tables. qpath_res( qpath, expr. hir_id) {
1838- Res :: Def ( Res :: Upvar ( .. ) , local_id, ..) => {
1838+ Res :: Upvar ( local_id, ..) => {
18391839 if local_id == self . var {
18401840 // we are not indexing anything, record that
18411841 self . nonindex = true ;
@@ -2383,7 +2383,7 @@ impl<'a, 'tcx> VarCollectorVisitor<'a, 'tcx> {
23832383 let res = self . cx. tables. qpath_res( qpath, ex. hir_id) ;
23842384 then {
23852385 match res {
2386- Res :: Local ( node_id) | Res :: Def ( Res :: Upvar ( .. ) , node_id, ..) => {
2386+ Res :: Local ( node_id) | Res :: Upvar ( node_id, ..) => {
23872387 self . ids. insert( node_id) ;
23882388 } ,
23892389 Res :: Def ( DefKind :: Static , def_id) => {
0 commit comments