@@ -1774,7 +1774,7 @@ impl<'a, 'tcx> VarVisitor<'a, 'tcx> {
1774
1774
}
1775
1775
let res = self . cx. tables. qpath_res( seqpath, seqexpr. hir_id) ;
1776
1776
match res {
1777
- Res :: Local ( hir_id) | Res :: Def ( Res :: Upvar ( .. ) , hir_id, ..) => {
1777
+ Res :: Local ( hir_id) | Res :: Upvar ( hir_id, ..) => {
1778
1778
let parent_id = self . cx. tcx. hir( ) . get_parent_item( expr. hir_id) ;
1779
1779
let parent_def_id = self . cx. tcx. hir( ) . local_def_id_from_hir_id( parent_id) ;
1780
1780
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> {
1835
1835
if path. segments. len( ) == 1 ;
1836
1836
then {
1837
1837
match self . cx. tables. qpath_res( qpath, expr. hir_id) {
1838
- Res :: Def ( Res :: Upvar ( .. ) , local_id, ..) => {
1838
+ Res :: Upvar ( local_id, ..) => {
1839
1839
if local_id == self . var {
1840
1840
// we are not indexing anything, record that
1841
1841
self . nonindex = true ;
@@ -2383,7 +2383,7 @@ impl<'a, 'tcx> VarCollectorVisitor<'a, 'tcx> {
2383
2383
let res = self . cx. tables. qpath_res( qpath, ex. hir_id) ;
2384
2384
then {
2385
2385
match res {
2386
- Res :: Local ( node_id) | Res :: Def ( Res :: Upvar ( .. ) , node_id, ..) => {
2386
+ Res :: Local ( node_id) | Res :: Upvar ( node_id, ..) => {
2387
2387
self . ids. insert( node_id) ;
2388
2388
} ,
2389
2389
Res :: Def ( DefKind :: Static , def_id) => {
0 commit comments