@@ -27,7 +27,6 @@ use middle::ty::{self};
2727use middle:: ty:: { MethodCall , MethodObject , MethodTraitObject } ;
2828use middle:: ty:: { MethodOrigin , MethodParam , MethodTypeParam } ;
2929use middle:: ty:: { MethodStatic , MethodStaticClosure } ;
30- use util:: ppaux:: Repr ;
3130
3231use syntax:: { ast, ast_util} ;
3332use syntax:: ptr:: P ;
@@ -362,8 +361,8 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
362361 consume_id : ast:: NodeId ,
363362 consume_span : Span ,
364363 cmt : mc:: cmt < ' tcx > ) {
365- debug ! ( "delegate_consume(consume_id={}, cmt={})" ,
366- consume_id, cmt. repr ( ) ) ;
364+ debug ! ( "delegate_consume(consume_id={}, cmt={:? })" ,
365+ consume_id, cmt) ;
367366
368367 let mode = copy_or_move ( self . typer , & cmt, DirectRefMove ) ;
369368 self . delegate . consume ( consume_id, consume_span, cmt, mode) ;
@@ -376,7 +375,7 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
376375 }
377376
378377 pub fn consume_expr ( & mut self , expr : & ast:: Expr ) {
379- debug ! ( "consume_expr(expr={})" , expr. repr ( ) ) ;
378+ debug ! ( "consume_expr(expr={:? })" , expr) ;
380379
381380 let cmt = return_if_err ! ( self . mc. cat_expr( expr) ) ;
382381 self . delegate_consume ( expr. id , expr. span , cmt) ;
@@ -397,8 +396,8 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
397396 r : ty:: Region ,
398397 bk : ty:: BorrowKind ,
399398 cause : LoanCause ) {
400- debug ! ( "borrow_expr(expr={}, r={}, bk={})" ,
401- expr. repr ( ) , r. repr ( ) , bk. repr ( ) ) ;
399+ debug ! ( "borrow_expr(expr={:? }, r={:? }, bk={:? })" ,
400+ expr, r, bk) ;
402401
403402 let cmt = return_if_err ! ( self . mc. cat_expr( expr) ) ;
404403 self . delegate . borrow ( expr. id , expr. span , cmt, r, bk, cause) ;
@@ -414,7 +413,7 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
414413 }
415414
416415 pub fn walk_expr ( & mut self , expr : & ast:: Expr ) {
417- debug ! ( "walk_expr(expr={})" , expr. repr ( ) ) ;
416+ debug ! ( "walk_expr(expr={:? })" , expr) ;
418417
419418 self . walk_adjustment ( expr) ;
420419
@@ -618,8 +617,8 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
618617
619618 fn walk_callee ( & mut self , call : & ast:: Expr , callee : & ast:: Expr ) {
620619 let callee_ty = return_if_err ! ( self . typer. expr_ty_adjusted( callee) ) ;
621- debug ! ( "walk_callee: callee={} callee_ty={}" ,
622- callee. repr ( ) , callee_ty. repr ( ) ) ;
620+ debug ! ( "walk_callee: callee={:? } callee_ty={:? }" ,
621+ callee, callee_ty) ;
623622 let call_scope = region:: CodeExtent :: from_node_id ( call. id ) ;
624623 match callee_ty. sty {
625624 ty:: TyBareFn ( ..) => {
@@ -637,7 +636,7 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
637636 None => {
638637 self . tcx ( ) . sess . span_bug (
639638 callee. span ,
640- & format ! ( "unexpected callee type {}" , callee_ty. repr ( ) ) )
639+ & format ! ( "unexpected callee type {}" , callee_ty) )
641640 }
642641 } ;
643642 match overloaded_call_type {
@@ -811,7 +810,7 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
811810 fn walk_autoderefs ( & mut self ,
812811 expr : & ast:: Expr ,
813812 autoderefs : usize ) {
814- debug ! ( "walk_autoderefs expr={} autoderefs={}" , expr. repr ( ) , autoderefs) ;
813+ debug ! ( "walk_autoderefs expr={:? } autoderefs={}" , expr, autoderefs) ;
815814
816815 for i in 0 ..autoderefs {
817816 let deref_id = ty:: MethodCall :: autoderef ( expr. id , i as u32 ) ;
@@ -828,8 +827,8 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
828827 let ( m, r) = match self_ty. sty {
829828 ty:: TyRef ( r, ref m) => ( m. mutbl , r) ,
830829 _ => self . tcx ( ) . sess . span_bug ( expr. span ,
831- & format ! ( "bad overloaded deref type {}" ,
832- method_ty. repr ( ) ) )
830+ & format ! ( "bad overloaded deref type {:? }" ,
831+ method_ty) )
833832 } ;
834833 let bk = ty:: BorrowKind :: from_mutbl ( m) ;
835834 self . delegate . borrow ( expr. id , expr. span , cmt,
@@ -842,9 +841,9 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
842841 fn walk_autoderefref ( & mut self ,
843842 expr : & ast:: Expr ,
844843 adj : & ty:: AutoDerefRef < ' tcx > ) {
845- debug ! ( "walk_autoderefref expr={} adj={}" ,
846- expr. repr ( ) ,
847- adj. repr ( ) ) ;
844+ debug ! ( "walk_autoderefref expr={:? } adj={:? }" ,
845+ expr,
846+ adj) ;
848847
849848 self . walk_autoderefs ( expr, adj. autoderefs ) ;
850849
@@ -875,9 +874,9 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
875874 opt_autoref : Option < ty:: AutoRef < ' tcx > > )
876875 -> mc:: cmt < ' tcx >
877876 {
878- debug ! ( "walk_autoref(expr.id={} cmt_derefd={} opt_autoref={:?})" ,
877+ debug ! ( "walk_autoref(expr.id={} cmt_derefd={:? } opt_autoref={:?})" ,
879878 expr. id,
880- cmt_base. repr ( ) ,
879+ cmt_base,
881880 opt_autoref) ;
882881
883882 let cmt_base_ty = cmt_base. ty ;
@@ -901,9 +900,9 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
901900 }
902901
903902 ty:: AutoUnsafe ( m) => {
904- debug ! ( "walk_autoref: expr.id={} cmt_base={}" ,
903+ debug ! ( "walk_autoref: expr.id={} cmt_base={:? }" ,
905904 expr. id,
906- cmt_base. repr ( ) ) ;
905+ cmt_base) ;
907906
908907 // Converting from a &T to *T (or &mut T to *mut T) is
909908 // treated as borrowing it for the enclosing temporary
@@ -1011,8 +1010,8 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
10111010 cmt_discr : mc:: cmt < ' tcx > ,
10121011 pat : & ast:: Pat ,
10131012 mode : & mut TrackMatchMode ) {
1014- debug ! ( "determine_pat_move_mode cmt_discr={} pat={}" , cmt_discr. repr ( ) ,
1015- pat. repr ( ) ) ;
1013+ debug ! ( "determine_pat_move_mode cmt_discr={:? } pat={:? }" , cmt_discr,
1014+ pat) ;
10161015 return_if_err ! ( self . mc. cat_pattern( cmt_discr, pat, |_mc, cmt_pat, pat| {
10171016 let tcx = self . tcx( ) ;
10181017 let def_map = & self . tcx( ) . def_map;
@@ -1043,8 +1042,8 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
10431042 cmt_discr : mc:: cmt < ' tcx > ,
10441043 pat : & ast:: Pat ,
10451044 match_mode : MatchMode ) {
1046- debug ! ( "walk_pat cmt_discr={} pat={}" , cmt_discr. repr ( ) ,
1047- pat. repr ( ) ) ;
1045+ debug ! ( "walk_pat cmt_discr={:? } pat={:? }" , cmt_discr,
1046+ pat) ;
10481047
10491048 let mc = & self . mc ;
10501049 let typer = self . typer ;
@@ -1054,9 +1053,9 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
10541053 if pat_util:: pat_is_binding( def_map, pat) {
10551054 let tcx = typer. tcx( ) ;
10561055
1057- debug!( "binding cmt_pat={} pat={} match_mode={:?}" ,
1058- cmt_pat. repr ( ) ,
1059- pat. repr ( ) ,
1056+ debug!( "binding cmt_pat={:? } pat={:? } match_mode={:?}" ,
1057+ cmt_pat,
1058+ pat,
10601059 match_mode) ;
10611060
10621061 // pat_ty: the type of the binding being produced.
@@ -1160,9 +1159,9 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
11601159 mc. cat_downcast( pat, cmt_pat, cmt_pat_ty, variant_did)
11611160 } ;
11621161
1163- debug!( "variant downcast_cmt={} pat={}" ,
1164- downcast_cmt. repr ( ) ,
1165- pat. repr ( ) ) ;
1162+ debug!( "variant downcast_cmt={:? } pat={:? }" ,
1163+ downcast_cmt,
1164+ pat) ;
11661165
11671166 delegate. matched_pat( pat, downcast_cmt, match_mode) ;
11681167 }
@@ -1172,9 +1171,9 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
11721171 // namespace; we encounter the former on
11731172 // e.g. patterns for unit structs).
11741173
1175- debug!( "struct cmt_pat={} pat={}" ,
1176- cmt_pat. repr ( ) ,
1177- pat. repr ( ) ) ;
1174+ debug!( "struct cmt_pat={:? } pat={:? }" ,
1175+ cmt_pat,
1176+ pat) ;
11781177
11791178 delegate. matched_pat( pat, cmt_pat, match_mode) ;
11801179 }
@@ -1192,9 +1191,9 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
11921191 // pattern.
11931192
11941193 if !tcx. sess. has_errors( ) {
1195- let msg = format!( "Pattern has unexpected type: {:?} and type {}" ,
1194+ let msg = format!( "Pattern has unexpected type: {:?} and type {:? }" ,
11961195 def,
1197- cmt_pat. ty. repr ( ) ) ;
1196+ cmt_pat. ty) ;
11981197 tcx. sess. span_bug( pat. span, & msg)
11991198 }
12001199 }
@@ -1209,9 +1208,9 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
12091208 // reported.
12101209
12111210 if !tcx. sess. has_errors( ) {
1212- let msg = format!( "Pattern has unexpected def: {:?} and type {}" ,
1211+ let msg = format!( "Pattern has unexpected def: {:?} and type {:? }" ,
12131212 def,
1214- cmt_pat. ty. repr ( ) ) ;
1213+ cmt_pat. ty) ;
12151214 tcx. sess. span_bug( pat. span, & msg[ ..] )
12161215 }
12171216 }
@@ -1237,7 +1236,7 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
12371236 }
12381237
12391238 fn walk_captures ( & mut self , closure_expr : & ast:: Expr ) {
1240- debug ! ( "walk_captures({})" , closure_expr. repr ( ) ) ;
1239+ debug ! ( "walk_captures({:? })" , closure_expr) ;
12411240
12421241 ty:: with_freevars ( self . tcx ( ) , closure_expr. id , |freevars| {
12431242 for freevar in freevars {
0 commit comments