@@ -756,7 +756,6 @@ pub enum sty {
756756 // on non-useful type error messages)
757757
758758 // "Fake" types, used for trans purposes
759- ty_type, // type_desc*
760759 ty_unboxed_vec( mt ) ,
761760}
762761
@@ -1181,7 +1180,7 @@ pub fn mk_t(cx: ctxt, st: sty) -> t {
11811180 flags |= get ( mt. ty ) . flags ;
11821181 }
11831182 & ty_nil | & ty_bool | & ty_char | & ty_int( _) | & ty_float( _) | & ty_uint( _) |
1184- & ty_str( _) | & ty_type => { }
1183+ & ty_str( _) => { }
11851184 // You might think that we could just return ty_err for
11861185 // any type containing ty_err as a component, and get
11871186 // rid of the has_ty_err flag -- likewise for ty_bot (with
@@ -1444,8 +1443,6 @@ pub fn mk_param(cx: ctxt, n: uint, k: DefId) -> t {
14441443 mk_t ( cx, ty_param ( param_ty { idx : n, def_id : k } ) )
14451444}
14461445
1447- pub fn mk_type ( cx : ctxt ) -> t { mk_t ( cx, ty_type) }
1448-
14491446pub fn walk_ty ( ty : t , f: |t|) {
14501447 maybe_walk_ty ( ty, |t| { f ( t) ; true } ) ;
14511448}
@@ -1456,7 +1453,7 @@ pub fn maybe_walk_ty(ty: t, f: |t| -> bool) {
14561453 }
14571454 match get ( ty) . sty {
14581455 ty_nil | ty_bot | ty_bool | ty_char | ty_int( _) | ty_uint( _) | ty_float( _) |
1459- ty_str( _) | ty_type | ty_self( _) |
1456+ ty_str( _) | ty_self( _) |
14601457 ty_infer( _) | ty_param( _) | ty_err => { }
14611458 ty_box( ty) | ty_uniq( ty) => maybe_walk_ty ( ty, f) ,
14621459 ty_vec( ref tm, _) | ty_unboxed_vec( ref tm) | ty_ptr( ref tm) |
@@ -1730,7 +1727,7 @@ pub fn type_is_unique(ty: t) -> bool {
17301727pub fn type_is_scalar ( ty : t ) -> bool {
17311728 match get ( ty) . sty {
17321729 ty_nil | ty_bool | ty_char | ty_int( _) | ty_float( _) | ty_uint( _) |
1733- ty_infer( IntVar ( _) ) | ty_infer( FloatVar ( _) ) | ty_type |
1730+ ty_infer( IntVar ( _) ) | ty_infer( FloatVar ( _) ) |
17341731 ty_bare_fn( ..) | ty_ptr( _) => true ,
17351732 _ => false
17361733 }
@@ -2216,8 +2213,6 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
22162213 }
22172214 ty_unboxed_vec( mt) => TC :: InteriorUnsized | tc_mt ( cx, mt, cache) ,
22182215
2219- ty_type => TC :: None ,
2220-
22212216 ty_err => {
22222217 cx. sess . bug ( "asked to compute contents of error type" ) ;
22232218 }
@@ -2401,7 +2396,6 @@ pub fn is_instantiable(cx: ctxt, r_ty: t) -> bool {
24012396 ty_err |
24022397 ty_param( _) |
24032398 ty_self( _) |
2404- ty_type |
24052399 ty_vec( _, _) |
24062400 ty_unboxed_vec( _) => {
24072401 false
@@ -2628,7 +2622,7 @@ pub fn type_is_pod(cx: ctxt, ty: t) -> bool {
26282622 match get ( ty) . sty {
26292623 // Scalar types
26302624 ty_nil | ty_bot | ty_bool | ty_char | ty_int( _) | ty_float( _) | ty_uint( _) |
2631- ty_type | ty_ptr( _) | ty_bare_fn( _) => result = true ,
2625+ ty_ptr( _) | ty_bare_fn( _) => result = true ,
26322626 // Boxed types
26332627 ty_box( _) | ty_uniq( _) | ty_closure( _) |
26342628 ty_str( vstore_uniq) |
@@ -3556,7 +3550,7 @@ pub fn occurs_check(tcx: ctxt, sp: Span, vid: TyVid, rt: t) {
35563550pub fn ty_sort_str ( cx : ctxt , t : t ) -> ~str {
35573551 match get ( t) . sty {
35583552 ty_nil | ty_bot | ty_bool | ty_char | ty_int( _) |
3559- ty_uint( _) | ty_float( _) | ty_str( _) | ty_type => {
3553+ ty_uint( _) | ty_float( _) | ty_str( _) => {
35603554 :: util:: ppaux:: ty_to_str ( cx, t)
35613555 }
35623556
@@ -5120,9 +5114,8 @@ pub fn hash_crate_independent(tcx: ctxt, t: t, local_hash: ~str) -> u64 {
51205114 }
51215115 ty_infer( _) => unreachable ! ( ) ,
51225116 ty_err => hash. input ( [ 23 ] ) ,
5123- ty_type => hash. input ( [ 24 ] ) ,
51245117 ty_unboxed_vec( m) => {
5125- hash. input ( [ 25 ] ) ;
5118+ hash. input ( [ 24 ] ) ;
51265119 mt ( & mut hash, m) ;
51275120 }
51285121 }
0 commit comments