@@ -756,7 +756,6 @@ pub enum sty {
756
756
// on non-useful type error messages)
757
757
758
758
// "Fake" types, used for trans purposes
759
- ty_type, // type_desc*
760
759
ty_unboxed_vec( mt ) ,
761
760
}
762
761
@@ -1181,7 +1180,7 @@ pub fn mk_t(cx: ctxt, st: sty) -> t {
1181
1180
flags |= get ( mt. ty ) . flags ;
1182
1181
}
1183
1182
& ty_nil | & ty_bool | & ty_char | & ty_int( _) | & ty_float( _) | & ty_uint( _) |
1184
- & ty_str( _) | & ty_type => { }
1183
+ & ty_str( _) => { }
1185
1184
// You might think that we could just return ty_err for
1186
1185
// any type containing ty_err as a component, and get
1187
1186
// 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 {
1444
1443
mk_t ( cx, ty_param ( param_ty { idx : n, def_id : k } ) )
1445
1444
}
1446
1445
1447
- pub fn mk_type ( cx : ctxt ) -> t { mk_t ( cx, ty_type) }
1448
-
1449
1446
pub fn walk_ty ( ty : t , f: |t|) {
1450
1447
maybe_walk_ty ( ty, |t| { f ( t) ; true } ) ;
1451
1448
}
@@ -1456,7 +1453,7 @@ pub fn maybe_walk_ty(ty: t, f: |t| -> bool) {
1456
1453
}
1457
1454
match get ( ty) . sty {
1458
1455
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( _) |
1460
1457
ty_infer( _) | ty_param( _) | ty_err => { }
1461
1458
ty_box( ty) | ty_uniq( ty) => maybe_walk_ty ( ty, f) ,
1462
1459
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 {
1730
1727
pub fn type_is_scalar ( ty : t ) -> bool {
1731
1728
match get ( ty) . sty {
1732
1729
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 ( _) ) |
1734
1731
ty_bare_fn( ..) | ty_ptr( _) => true ,
1735
1732
_ => false
1736
1733
}
@@ -2216,8 +2213,6 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
2216
2213
}
2217
2214
ty_unboxed_vec( mt) => TC :: InteriorUnsized | tc_mt ( cx, mt, cache) ,
2218
2215
2219
- ty_type => TC :: None ,
2220
-
2221
2216
ty_err => {
2222
2217
cx. sess . bug ( "asked to compute contents of error type" ) ;
2223
2218
}
@@ -2401,7 +2396,6 @@ pub fn is_instantiable(cx: ctxt, r_ty: t) -> bool {
2401
2396
ty_err |
2402
2397
ty_param( _) |
2403
2398
ty_self( _) |
2404
- ty_type |
2405
2399
ty_vec( _, _) |
2406
2400
ty_unboxed_vec( _) => {
2407
2401
false
@@ -2628,7 +2622,7 @@ pub fn type_is_pod(cx: ctxt, ty: t) -> bool {
2628
2622
match get ( ty) . sty {
2629
2623
// Scalar types
2630
2624
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 ,
2632
2626
// Boxed types
2633
2627
ty_box( _) | ty_uniq( _) | ty_closure( _) |
2634
2628
ty_str( vstore_uniq) |
@@ -3556,7 +3550,7 @@ pub fn occurs_check(tcx: ctxt, sp: Span, vid: TyVid, rt: t) {
3556
3550
pub fn ty_sort_str ( cx : ctxt , t : t ) -> ~str {
3557
3551
match get ( t) . sty {
3558
3552
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( _) => {
3560
3554
:: util:: ppaux:: ty_to_str ( cx, t)
3561
3555
}
3562
3556
@@ -5120,9 +5114,8 @@ pub fn hash_crate_independent(tcx: ctxt, t: t, local_hash: ~str) -> u64 {
5120
5114
}
5121
5115
ty_infer( _) => unreachable ! ( ) ,
5122
5116
ty_err => hash. input ( [ 23 ] ) ,
5123
- ty_type => hash. input ( [ 24 ] ) ,
5124
5117
ty_unboxed_vec( m) => {
5125
- hash. input ( [ 25 ] ) ;
5118
+ hash. input ( [ 24 ] ) ;
5126
5119
mt ( & mut hash, m) ;
5127
5120
}
5128
5121
}
0 commit comments