@@ -431,7 +431,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
431
431
// fields are actually safe.
432
432
let mut all_phantom = true ;
433
433
for field in & def. struct_variant ( ) . fields {
434
- let field_ty = cx. normalize_associated_type ( & field. ty ( cx, substs) ) ;
434
+ let field_ty = cx. normalize_associated_type_in ( & field. ty ( cx, substs) ) ;
435
435
let r = self . check_type_for_ffi ( cache, field_ty) ;
436
436
match r {
437
437
FfiSafe => {
@@ -463,7 +463,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
463
463
464
464
let mut all_phantom = true ;
465
465
for field in & def. struct_variant ( ) . fields {
466
- let field_ty = cx. normalize_associated_type ( & field. ty ( cx, substs) ) ;
466
+ let field_ty = cx. normalize_associated_type_in ( & field. ty ( cx, substs) ) ;
467
467
let r = self . check_type_for_ffi ( cache, field_ty) ;
468
468
match r {
469
469
FfiSafe => {
@@ -516,7 +516,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
516
516
// Check the contained variants.
517
517
for variant in & def. variants {
518
518
for field in & variant. fields {
519
- let arg = cx. normalize_associated_type ( & field. ty ( cx, substs) ) ;
519
+ let arg = cx. normalize_associated_type_in ( & field. ty ( cx, substs) ) ;
520
520
let r = self . check_type_for_ffi ( cache, arg) ;
521
521
match r {
522
522
FfiSafe => { }
@@ -629,7 +629,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
629
629
fn check_type_for_ffi_and_report_errors ( & mut self , sp : Span , ty : Ty < ' tcx > ) {
630
630
// it is only OK to use this function because extern fns cannot have
631
631
// any generic types right now:
632
- let ty = self . cx . tcx . normalize_associated_type ( & ty) ;
632
+ let ty = self . cx . tcx . normalize_associated_type_in ( & ty) ;
633
633
634
634
match self . check_type_for_ffi ( & mut FxHashSet ( ) , ty) {
635
635
FfiResult :: FfiSafe => { }
0 commit comments