@@ -258,7 +258,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
258258 adt. variant_with_id ( vid) . fields . get ( i) . map ( |f| f. ty ( self , substs) )
259259 }
260260 ( & TyAdt ( adt, substs) , None ) => {
261- // Don't use `struct_variant `, this may be a univariant enum.
261+ // Don't use `non_enum_variant `, this may be a univariant enum.
262262 adt. variants [ 0 ] . fields . get ( i) . map ( |f| f. ty ( self , substs) )
263263 }
264264 ( & TyTuple ( ref v, _) , None ) => v. get ( i) . cloned ( ) ,
@@ -277,7 +277,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
277277 adt. variant_with_id ( vid) . find_field_named ( n) . map ( |f| f. ty ( self , substs) )
278278 }
279279 ( & TyAdt ( adt, substs) , None ) => {
280- adt. struct_variant ( ) . find_field_named ( n) . map ( |f| f. ty ( self , substs) )
280+ adt. non_enum_variant ( ) . find_field_named ( n) . map ( |f| f. ty ( self , substs) )
281281 }
282282 _ => return None
283283 }
@@ -293,7 +293,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
293293 if !def. is_struct ( ) {
294294 break ;
295295 }
296- match def. struct_variant ( ) . fields . last ( ) {
296+ match def. non_enum_variant ( ) . fields . last ( ) {
297297 Some ( f) => ty = f. ty ( self , substs) ,
298298 None => break ,
299299 }
@@ -329,7 +329,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
329329 match ( & a. sty , & b. sty ) {
330330 ( & TyAdt ( a_def, a_substs) , & TyAdt ( b_def, b_substs) )
331331 if a_def == b_def && a_def. is_struct ( ) => {
332- if let Some ( f) = a_def. struct_variant ( ) . fields . last ( ) {
332+ if let Some ( f) = a_def. non_enum_variant ( ) . fields . last ( ) {
333333 a = f. ty ( self , a_substs) ;
334334 b = f. ty ( self , b_substs) ;
335335 } else {
0 commit comments