@@ -1334,7 +1334,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
1334
1334
tcx. sess . span_fatal (
1335
1335
expr. span , #fmt ( "a loop function's last argument \
1336
1336
should return `bool`, not `%s`",
1337
- ty_to_str ( tcx , fty. output ) ) ) ;
1337
+ fcx . infcx . ty_to_str ( fty. output ) ) ) ;
1338
1338
}
1339
1339
}
1340
1340
( ty:: mk_fn ( tcx, { output: ty:: mk_nil ( tcx) with fty} ) , fty. proto )
@@ -1471,12 +1471,12 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
1471
1471
_ {
1472
1472
if ty:: type_is_nil ( t_e) {
1473
1473
tcx. sess . span_err ( expr. span , "cast from nil: " +
1474
- ty_to_str ( tcx , t_e) + " as " +
1475
- ty_to_str ( tcx , t_1) ) ;
1474
+ fcx . infcx . ty_to_str ( t_e) + " as " +
1475
+ fcx . infcx . ty_to_str ( t_1) ) ;
1476
1476
} else if ty:: type_is_nil ( t_1) {
1477
1477
tcx. sess . span_err ( expr. span , "cast to nil: " +
1478
- ty_to_str ( tcx , t_e) + " as " +
1479
- ty_to_str ( tcx , t_1) ) ;
1478
+ fcx . infcx . ty_to_str ( t_e) + " as " +
1479
+ fcx . infcx . ty_to_str ( t_1) ) ;
1480
1480
}
1481
1481
1482
1482
let t_1_is_scalar = type_is_scalar ( fcx, expr. span , t_1) ;
@@ -1490,8 +1490,8 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
1490
1490
*/
1491
1491
tcx. sess . span_err ( expr. span ,
1492
1492
"non-scalar cast: " +
1493
- ty_to_str ( tcx , t_e) + " as " +
1494
- ty_to_str ( tcx , t_1) ) ;
1493
+ fcx . infcx . ty_to_str ( t_e) + " as " +
1494
+ fcx . infcx . ty_to_str ( t_1) ) ;
1495
1495
}
1496
1496
}
1497
1497
}
@@ -1639,7 +1639,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
1639
1639
let t_err = fcx. infcx . resolve_type_vars_if_possible ( expr_t) ;
1640
1640
let msg = #fmt[ "attempted access of field %s on type %s, but \
1641
1641
no public field or method with that name was found",
1642
- * field, ty_to_str ( tcx , t_err) ] ;
1642
+ * field, fcx . infcx . ty_to_str ( t_err) ] ;
1643
1643
tcx. sess . span_err ( expr. span , msg) ;
1644
1644
// NB: Adding a bogus type to allow typechecking to continue
1645
1645
fcx. write_ty ( id, fcx. infcx . next_ty_var ( ) ) ;
@@ -1667,7 +1667,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
1667
1667
_ {
1668
1668
tcx. sess . span_fatal (
1669
1669
expr. span , "cannot index a value of type `" +
1670
- ty_to_str ( tcx , base_t) + "`" ) ;
1670
+ fcx . infcx . ty_to_str ( base_t) + "`" ) ;
1671
1671
}
1672
1672
}
1673
1673
}
@@ -1708,7 +1708,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
1708
1708
none {
1709
1709
let t_err = fcx. infcx . resolve_type_vars_if_possible ( p_ty) ;
1710
1710
let msg = #fmt[ "no `alloc()` method found for type `%s`" ,
1711
- ty_to_str ( tcx , t_err) ] ;
1711
+ fcx . infcx . ty_to_str ( t_err) ] ;
1712
1712
tcx. sess . span_err ( expr. span , msg) ;
1713
1713
}
1714
1714
}
0 commit comments