@@ -15,7 +15,6 @@ use self::UnsafeContext::*;
1515use middle:: def;
1616use middle:: ty:: { self , Ty } ;
1717use middle:: ty:: MethodCall ;
18- use util:: ppaux;
1918
2019use syntax:: ast;
2120use syntax:: codemap:: Span ;
@@ -66,8 +65,8 @@ impl<'a, 'tcx> EffectCheckVisitor<'a, 'tcx> {
6665 ast:: ExprIndex ( ref base, _) => ty:: node_id_to_type ( self . tcx , base. id ) ,
6766 _ => return
6867 } ;
69- debug ! ( "effect: checking index with base type {}" ,
70- ppaux :: ty_to_string ( self . tcx , base_type) ) ;
68+ debug ! ( "effect: checking index with base type {:? }" ,
69+ base_type) ;
7170 match base_type. sty {
7271 ty:: TyBox ( ty) | ty:: TyRef ( _, ty:: mt { ty, ..} ) => if ty:: TyStr == ty. sty {
7372 span_err ! ( self . tcx. sess, e. span, E0134 ,
@@ -142,25 +141,25 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EffectCheckVisitor<'a, 'tcx> {
142141 ast:: ExprMethodCall ( _, _, _) => {
143142 let method_call = MethodCall :: expr ( expr. id ) ;
144143 let base_type = self . tcx . method_map . borrow ( ) . get ( & method_call) . unwrap ( ) . ty ;
145- debug ! ( "effect: method call case, base type is {}" ,
146- ppaux :: ty_to_string ( self . tcx , base_type) ) ;
144+ debug ! ( "effect: method call case, base type is {:? }" ,
145+ base_type) ;
147146 if type_is_unsafe_function ( base_type) {
148147 self . require_unsafe ( expr. span ,
149148 "invocation of unsafe method" )
150149 }
151150 }
152151 ast:: ExprCall ( ref base, _) => {
153152 let base_type = ty:: node_id_to_type ( self . tcx , base. id ) ;
154- debug ! ( "effect: call case, base type is {}" ,
155- ppaux :: ty_to_string ( self . tcx , base_type) ) ;
153+ debug ! ( "effect: call case, base type is {:? }" ,
154+ base_type) ;
156155 if type_is_unsafe_function ( base_type) {
157156 self . require_unsafe ( expr. span , "call to unsafe function" )
158157 }
159158 }
160159 ast:: ExprUnary ( ast:: UnDeref , ref base) => {
161160 let base_type = ty:: node_id_to_type ( self . tcx , base. id ) ;
162- debug ! ( "effect: unary case, base type is {}" ,
163- ppaux :: ty_to_string ( self . tcx , base_type) ) ;
161+ debug ! ( "effect: unary case, base type is {:? }" ,
162+ base_type) ;
164163 if let ty:: TyRawPtr ( _) = base_type. sty {
165164 self . require_unsafe ( expr. span , "dereference of raw pointer" )
166165 }
0 commit comments