@@ -50,7 +50,7 @@ struct MarkSymbolVisitor<'a, 'tcx: 'a> {
5050 tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
5151 tables : & ' a ty:: TypeckTables < ' tcx > ,
5252 live_symbols : Box < FxHashSet < ast:: NodeId > > ,
53- struct_has_extern_repr : bool ,
53+ repr_has_repr_c : bool ,
5454 in_pat : bool ,
5555 inherited_pub_visibility : bool ,
5656 ignore_variant_stack : Vec < DefId > ,
@@ -102,7 +102,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
102102 fn handle_field_access ( & mut self , lhs : & hir:: Expr , name : ast:: Name ) {
103103 match self . tables . expr_ty_adjusted ( lhs) . sty {
104104 ty:: TyAdt ( def, _) => {
105- self . insert_def_id ( def. struct_variant ( ) . field_named ( name) . did ) ;
105+ self . insert_def_id ( def. non_enum_variant ( ) . field_named ( name) . did ) ;
106106 }
107107 _ => span_bug ! ( lhs. span, "named field access on non-ADT" ) ,
108108 }
@@ -111,7 +111,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
111111 fn handle_tup_field_access ( & mut self , lhs : & hir:: Expr , idx : usize ) {
112112 match self . tables . expr_ty_adjusted ( lhs) . sty {
113113 ty:: TyAdt ( def, _) => {
114- self . insert_def_id ( def. struct_variant ( ) . fields [ idx] . did ) ;
114+ self . insert_def_id ( def. non_enum_variant ( ) . fields [ idx] . did ) ;
115115 }
116116 ty:: TyTuple ( ..) => { }
117117 _ => span_bug ! ( lhs. span, "numeric field access on non-ADT" ) ,
@@ -149,8 +149,8 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
149149 }
150150
151151 fn visit_node ( & mut self , node : & hir_map:: Node < ' tcx > ) {
152- let had_extern_repr = self . struct_has_extern_repr ;
153- self . struct_has_extern_repr = false ;
152+ let had_repr_c = self . repr_has_repr_c ;
153+ self . repr_has_repr_c = false ;
154154 let had_inherited_pub_visibility = self . inherited_pub_visibility ;
155155 self . inherited_pub_visibility = false ;
156156 match * node {
@@ -159,7 +159,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
159159 hir:: ItemStruct ( ..) | hir:: ItemUnion ( ..) => {
160160 let def_id = self . tcx . hir . local_def_id ( item. id ) ;
161161 let def = self . tcx . adt_def ( def_id) ;
162- self . struct_has_extern_repr = def. repr . c ( ) ;
162+ self . repr_has_repr_c = def. repr . c ( ) ;
163163
164164 intravisit:: walk_item ( self , & item) ;
165165 }
@@ -187,7 +187,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
187187 }
188188 _ => ( )
189189 }
190- self . struct_has_extern_repr = had_extern_repr ;
190+ self . repr_has_repr_c = had_repr_c ;
191191 self . inherited_pub_visibility = had_inherited_pub_visibility;
192192 }
193193
@@ -223,10 +223,10 @@ impl<'a, 'tcx> Visitor<'tcx> for MarkSymbolVisitor<'a, 'tcx> {
223223
224224 fn visit_variant_data ( & mut self , def : & ' tcx hir:: VariantData , _: ast:: Name ,
225225 _: & hir:: Generics , _: ast:: NodeId , _: syntax_pos:: Span ) {
226- let has_extern_repr = self . struct_has_extern_repr ;
226+ let has_repr_c = self . repr_has_repr_c ;
227227 let inherited_pub_visibility = self . inherited_pub_visibility ;
228228 let live_fields = def. fields ( ) . iter ( ) . filter ( |f| {
229- has_extern_repr || inherited_pub_visibility || f. vis == hir:: Public
229+ has_repr_c || inherited_pub_visibility || f. vis == hir:: Public
230230 } ) ;
231231 self . live_symbols . extend ( live_fields. map ( |f| f. id ) ) ;
232232
@@ -428,7 +428,7 @@ fn find_live<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
428428 tcx,
429429 tables : & ty:: TypeckTables :: empty ( None ) ,
430430 live_symbols : box FxHashSet ( ) ,
431- struct_has_extern_repr : false ,
431+ repr_has_repr_c : false ,
432432 in_pat : false ,
433433 inherited_pub_visibility : false ,
434434 ignore_variant_stack : vec ! [ ] ,
0 commit comments