@@ -71,9 +71,9 @@ use middle::ty;
7171use middle:: typeck:: infer:: { CoerceResult , resolve_type, Coercion } ;
7272use middle:: typeck:: infer:: combine:: { CombineFields , Combine } ;
7373use middle:: typeck:: infer:: sub:: Sub ;
74- use middle:: typeck:: infer:: to_str:: InferStr ;
7574use middle:: typeck:: infer:: resolve:: try_resolve_tvar_shallow;
7675use util:: common:: indenter;
76+ use util:: ppaux:: Repr ;
7777
7878use syntax:: abi;
7979use syntax:: ast:: MutImmutable ;
@@ -91,8 +91,8 @@ impl<'f> Coerce<'f> {
9191
9292 pub fn tys ( & self , a : ty:: t , b : ty:: t ) -> CoerceResult {
9393 debug ! ( "Coerce.tys({} => {})" ,
94- a. inf_str ( self . get_ref( ) . infcx) ,
95- b. inf_str ( self . get_ref( ) . infcx) ) ;
94+ a. repr ( self . get_ref( ) . infcx. tcx ) ,
95+ b. repr ( self . get_ref( ) . infcx. tcx ) ) ;
9696 let _indent = indenter ( ) ;
9797
9898 // Examine the supertype and consider auto-borrowing.
@@ -233,8 +233,8 @@ impl<'f> Coerce<'f> {
233233 mt_b : ty:: mt )
234234 -> CoerceResult {
235235 debug ! ( "coerce_borrowed_pointer(a={}, sty_a={:?}, b={}, mt_b={:?})" ,
236- a. inf_str ( self . get_ref( ) . infcx) , sty_a,
237- b. inf_str ( self . get_ref( ) . infcx) , mt_b) ;
236+ a. repr ( self . get_ref( ) . infcx. tcx ) , sty_a,
237+ b. repr ( self . get_ref( ) . infcx. tcx ) , mt_b) ;
238238
239239 // If we have a parameter of type `&M T_a` and the value
240240 // provided is `expr`, we will be adding an implicit borrow,
@@ -270,8 +270,8 @@ impl<'f> Coerce<'f> {
270270 b : ty:: t )
271271 -> CoerceResult {
272272 debug ! ( "coerce_borrowed_string(a={}, sty_a={:?}, b={})" ,
273- a. inf_str ( self . get_ref( ) . infcx) , sty_a,
274- b. inf_str ( self . get_ref( ) . infcx) ) ;
273+ a. repr ( self . get_ref( ) . infcx. tcx ) , sty_a,
274+ b. repr ( self . get_ref( ) . infcx. tcx ) ) ;
275275
276276 match * sty_a {
277277 ty:: ty_uniq( t) => match ty:: get ( t) . sty {
@@ -300,8 +300,8 @@ impl<'f> Coerce<'f> {
300300 mutbl_b : ast:: Mutability )
301301 -> CoerceResult {
302302 debug ! ( "coerce_borrowed_vector(a={}, sty_a={:?}, b={})" ,
303- a. inf_str ( self . get_ref( ) . infcx) , sty_a,
304- b. inf_str ( self . get_ref( ) . infcx) ) ;
303+ a. repr ( self . get_ref( ) . infcx. tcx ) , sty_a,
304+ b. repr ( self . get_ref( ) . infcx. tcx ) ) ;
305305
306306 let sub = Sub ( self . get_ref ( ) . clone ( ) ) ;
307307 let coercion = Coercion ( self . get_ref ( ) . trace . clone ( ) ) ;
@@ -336,8 +336,8 @@ impl<'f> Coerce<'f> {
336336 b_mutbl : ast:: Mutability ) -> CoerceResult
337337 {
338338 debug ! ( "coerce_borrowed_object(a={}, sty_a={:?}, b={})" ,
339- a. inf_str ( self . get_ref( ) . infcx) , sty_a,
340- b. inf_str ( self . get_ref( ) . infcx) ) ;
339+ a. repr ( self . get_ref( ) . infcx. tcx ) , sty_a,
340+ b. repr ( self . get_ref( ) . infcx. tcx ) ) ;
341341
342342 let tcx = self . get_ref ( ) . infcx . tcx ;
343343 let coercion = Coercion ( self . get_ref ( ) . trace . clone ( ) ) ;
@@ -376,8 +376,8 @@ impl<'f> Coerce<'f> {
376376 b : ty:: t )
377377 -> CoerceResult {
378378 debug ! ( "coerce_borrowed_fn(a={}, sty_a={:?}, b={})" ,
379- a. inf_str ( self . get_ref( ) . infcx) , sty_a,
380- b. inf_str ( self . get_ref( ) . infcx) ) ;
379+ a. repr ( self . get_ref( ) . infcx. tcx ) , sty_a,
380+ b. repr ( self . get_ref( ) . infcx. tcx ) ) ;
381381
382382 match * sty_a {
383383 ty:: ty_bare_fn( ref f) => {
@@ -400,7 +400,7 @@ impl<'f> Coerce<'f> {
400400 self . unpack_actual_value ( b, |sty_b| {
401401
402402 debug ! ( "coerce_from_bare_fn(a={}, b={})" ,
403- a. inf_str ( self . get_ref( ) . infcx) , b. inf_str ( self . get_ref( ) . infcx) ) ;
403+ a. repr ( self . get_ref( ) . infcx. tcx ) , b. repr ( self . get_ref( ) . infcx. tcx ) ) ;
404404
405405 if fn_ty_a. abi != abi:: Rust || fn_ty_a. fn_style != ast:: NormalFn {
406406 return self . subtype ( a, b) ;
@@ -429,8 +429,8 @@ impl<'f> Coerce<'f> {
429429 mt_b : ty:: mt )
430430 -> CoerceResult {
431431 debug ! ( "coerce_unsafe_ptr(a={}, sty_a={:?}, b={})" ,
432- a. inf_str ( self . get_ref( ) . infcx) , sty_a,
433- b. inf_str ( self . get_ref( ) . infcx) ) ;
432+ a. repr ( self . get_ref( ) . infcx. tcx ) , sty_a,
433+ b. repr ( self . get_ref( ) . infcx. tcx ) ) ;
434434
435435 let mt_a = match * sty_a {
436436 ty:: ty_rptr( _, mt) => mt,
@@ -462,8 +462,8 @@ impl<'f> Coerce<'f> {
462462 bounds : ty:: BuiltinBounds ) -> CoerceResult {
463463
464464 debug ! ( "coerce_object(a={}, sty_a={:?}, b={})" ,
465- a. inf_str ( self . get_ref( ) . infcx) , sty_a,
466- b. inf_str ( self . get_ref( ) . infcx) ) ;
465+ a. repr ( self . get_ref( ) . infcx. tcx ) , sty_a,
466+ b. repr ( self . get_ref( ) . infcx. tcx ) ) ;
467467
468468 Ok ( Some ( ty:: AutoObject ( trait_store, bounds,
469469 trait_def_id, trait_substs. clone ( ) ) ) )
0 commit comments