@@ -615,6 +615,7 @@ fn ty_to_str(&ctxt cx, &t typ) -> str {
615
615
case ( ty_char) { s += "char" ; }
616
616
case ( ty_str) { s += "str" ; }
617
617
case ( ty_box ( ?tm) ) { s += "@" + mt_to_str ( cx, tm) ; }
618
+ case ( ty_ptr ( ?tm) ) { s += "*" + mt_to_str ( cx, tm) ; }
618
619
case ( ty_vec ( ?tm) ) { s += "vec[" + mt_to_str ( cx, tm) + "]" ; }
619
620
case ( ty_port ( ?t) ) { s += "port[" + ty_to_str ( cx, t) + "]" ; }
620
621
case ( ty_chan ( ?t) ) { s += "chan[" + ty_to_str ( cx, t) + "]" ; }
@@ -781,6 +782,10 @@ fn fold_ty(&ctxt cx, ty_fold fld, t ty_0) -> t {
781
782
ty = copy_cname ( cx, mk_box ( cx, rec ( ty=fold_ty ( cx, fld, tm. ty ) ,
782
783
mut=tm. mut ) ) , ty) ;
783
784
}
785
+ case ( ty_ptr ( ?tm) ) {
786
+ ty = copy_cname ( cx, mk_ptr ( cx, rec ( ty=fold_ty ( cx, fld, tm. ty ) ,
787
+ mut=tm. mut ) ) , ty) ;
788
+ }
784
789
case ( ty_vec ( ?tm) ) {
785
790
ty = copy_cname ( cx, mk_vec ( cx, rec ( ty=fold_ty ( cx, fld, tm. ty ) ,
786
791
mut=tm. mut ) ) , ty) ;
@@ -978,6 +983,7 @@ fn type_is_scalar(&ctxt cx, &t ty) -> bool {
978
983
case ( ty_char) { ret true; }
979
984
case ( ty_type) { ret true; }
980
985
case ( ty_native) { ret true; }
986
+ case ( ty_ptr( _) ) { ret true; }
981
987
case ( _) { ret false; }
982
988
}
983
989
}
0 commit comments