@@ -116,7 +116,7 @@ export ty_opaque_closure_ptr, mk_opaque_closure_ptr;
116
116
export ty_opaque_box, mk_opaque_box;
117
117
export ty_float, mk_float, mk_mach_float, type_is_fp;
118
118
export ty_fn, FnTy , FnTyBase , FnMeta , FnSig , mk_fn;
119
- export ty_fn_proto, ty_fn_purity, ty_fn_ret, ty_fn_ret_style , tys_in_fn_ty;
119
+ export ty_fn_proto, ty_fn_purity, ty_fn_ret, tys_in_fn_ty;
120
120
export ty_int, mk_int, mk_mach_int, mk_char;
121
121
export mk_i8, mk_u8, mk_i16, mk_u16, mk_i32, mk_u32, mk_i64, mk_u64;
122
122
export mk_f32, mk_f64;
@@ -219,7 +219,6 @@ export terr_regions_not_same, terr_regions_no_overlap;
219
219
export terr_regions_insufficiently_polymorphic;
220
220
export terr_regions_overly_polymorphic;
221
221
export terr_proto_mismatch;
222
- export terr_ret_style_mismatch;
223
222
export terr_fn, terr_trait;
224
223
export purity_to_str;
225
224
export onceness_to_str;
@@ -517,15 +516,13 @@ pure fn type_id(t: t) -> uint { get(t).id }
517
516
* - `onceness` indicates whether the function can be called one time or many
518
517
* times.
519
518
* - `region` is the region bound on the function's upvars (often &static).
520
- * - `bounds` is the parameter bounds on the function's upvars.
521
- * - `ret_style` indicates whether the function returns a value or fails. */
519
+ * - `bounds` is the parameter bounds on the function's upvars. */
522
520
struct FnMeta {
523
521
purity : ast:: purity ,
524
522
proto : ast:: Proto ,
525
523
onceness : ast:: Onceness ,
526
524
region : Region ,
527
- bounds : @~[ param_bound ] ,
528
- ret_style : ret_style
525
+ bounds : @~[ param_bound ]
529
526
}
530
527
531
528
/**
@@ -695,7 +692,6 @@ struct expected_found<T> {
695
692
// Data structures used in type unification
696
693
enum type_err {
697
694
terr_mismatch,
698
- terr_ret_style_mismatch( expected_found < ast:: ret_style > ) ,
699
695
terr_purity_mismatch( expected_found < purity > ) ,
700
696
terr_onceness_mismatch( expected_found < Onceness > ) ,
701
697
terr_mutability,
@@ -2819,11 +2815,10 @@ impl arg : to_bytes::IterBytes {
2819
2815
2820
2816
impl FnMeta : to_bytes::IterBytes {
2821
2817
pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
2822
- to_bytes::iter_bytes_5 (&self.purity,
2818
+ to_bytes::iter_bytes_4 (&self.purity,
2823
2819
&self.proto,
2824
2820
&self.region,
2825
2821
&self.bounds,
2826
- &self.ret_style,
2827
2822
lsb0, f);
2828
2823
}
2829
2824
}
@@ -2969,13 +2964,6 @@ pure fn ty_fn_ret(fty: t) -> t {
2969
2964
}
2970
2965
}
2971
2966
2972
- fn ty_fn_ret_style ( fty: t) -> ast:: ret_style {
2973
- match get( fty) . sty {
2974
- ty_fn ( ref f) => f. meta . ret_style ,
2975
- _ => fail ~"ty_fn_ret_style( ) called on non-fn type"
2976
- }
2977
- }
2978
-
2979
2967
fn is_fn_ty ( fty: t) -> bool {
2980
2968
match get ( fty) . sty {
2981
2969
ty_fn( _) => true ,
@@ -3435,17 +3423,6 @@ fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
3435
3423
3436
3424
match * err {
3437
3425
terr_mismatch => ~"types differ",
3438
- terr_ret_style_mismatch( values) => {
3439
- fn to_str ( s : ast:: ret_style ) -> ~str {
3440
- match s {
3441
- ast:: noreturn => ~"non-returning",
3442
- ast:: return_val => ~"return -by-value"
3443
- }
3444
- }
3445
- fmt ! ( "expected %s function, found %s function" ,
3446
- to_str( values. expected) ,
3447
- to_str( values. expected) )
3448
- }
3449
3426
terr_purity_mismatch( values) => {
3450
3427
fmt ! ( "expected %s fn but found %s fn" ,
3451
3428
purity_to_str( values. expected) ,
@@ -4406,8 +4383,7 @@ impl FnMeta : cmp::Eq {
4406
4383
pure fn eq ( & self , other : & FnMeta ) -> bool {
4407
4384
( * self ) . purity == ( * other) . purity &&
4408
4385
( * self ) . proto == ( * other) . proto &&
4409
- ( * self ) . bounds == ( * other) . bounds &&
4410
- ( * self ) . ret_style == ( * other) . ret_style
4386
+ ( * self ) . bounds == ( * other) . bounds
4411
4387
}
4412
4388
pure fn ne ( & self , other : & FnMeta ) -> bool { !( * self ) . eq ( other) }
4413
4389
}
0 commit comments