@@ -51,7 +51,7 @@ struct MarkSymbolVisitor<'a, 'tcx: 'a> {
51
51
tables : & ' a ty:: TypeckTables < ' tcx > ,
52
52
live_symbols : Box < FxHashSet < ast:: NodeId > > ,
53
53
struct_has_extern_repr : bool ,
54
- ignore_non_const_paths : bool ,
54
+ in_pat : bool ,
55
55
inherited_pub_visibility : bool ,
56
56
ignore_variant_stack : Vec < DefId > ,
57
57
}
@@ -75,10 +75,10 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
75
75
76
76
fn handle_definition ( & mut self , def : Def ) {
77
77
match def {
78
- Def :: Const ( _) | Def :: AssociatedConst ( ..) => {
78
+ Def :: Const ( _) | Def :: AssociatedConst ( ..) | Def :: TyAlias ( _ ) => {
79
79
self . check_def_id ( def. def_id ( ) ) ;
80
80
}
81
- _ if self . ignore_non_const_paths => ( ) ,
81
+ _ if self . in_pat => ( ) ,
82
82
Def :: PrimTy ( ..) | Def :: SelfTy ( ..) |
83
83
Def :: Local ( ..) | Def :: Upvar ( ..) => { }
84
84
Def :: Variant ( variant_id) | Def :: VariantCtor ( variant_id, ..) => {
@@ -289,9 +289,9 @@ impl<'a, 'tcx> Visitor<'tcx> for MarkSymbolVisitor<'a, 'tcx> {
289
289
_ => ( )
290
290
}
291
291
292
- self . ignore_non_const_paths = true ;
292
+ self . in_pat = true ;
293
293
intravisit:: walk_pat ( self , pat) ;
294
- self . ignore_non_const_paths = false ;
294
+ self . in_pat = false ;
295
295
}
296
296
297
297
fn visit_path ( & mut self , path : & ' tcx hir:: Path , _: ast:: NodeId ) {
@@ -429,7 +429,7 @@ fn find_live<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
429
429
tables : & ty:: TypeckTables :: empty ( None ) ,
430
430
live_symbols : box FxHashSet ( ) ,
431
431
struct_has_extern_repr : false ,
432
- ignore_non_const_paths : false ,
432
+ in_pat : false ,
433
433
inherited_pub_visibility : false ,
434
434
ignore_variant_stack : vec ! [ ] ,
435
435
} ;
0 commit comments