@@ -115,8 +115,7 @@ fn type_of_fn(cx: @crate_ctxt, sp: span, is_method: bool, inputs: [ty::arg],
115
115
116
116
// Given a function type and a count of ty params, construct an llvm type
117
117
fn type_of_fn_from_ty ( cx : @crate_ctxt , sp : span , fty : ty:: t ,
118
- param_bounds : [ ty:: param_bounds ] )
119
- : returns_non_ty_var ( cx , fty ) -> TypeRef {
118
+ param_bounds : [ ty:: param_bounds ] ) -> TypeRef {
120
119
// FIXME: Check should be unnecessary, b/c it's implied
121
120
// by returns_non_ty_var(t). Make that a postcondition
122
121
// (see Issue #586)
@@ -173,8 +172,6 @@ fn type_of_inner(cx: @crate_ctxt, sp: span, t: ty::t)
173
172
T_struct ( tys)
174
173
}
175
174
ty:: ty_fn ( _) {
176
- // FIXME: could be a constraint on ty_fn
177
- check returns_non_ty_var ( cx, t) ;
178
175
T_fn_pair ( cx, type_of_fn_from_ty ( cx, sp, t, [ ] ) )
179
176
}
180
177
ty:: ty_native_fn ( args, out) {
@@ -242,7 +239,6 @@ fn type_of_ty_param_bounds_and_ty(lcx: @local_ctxt, sp: span,
242
239
let t = tpt. ty ;
243
240
alt ty:: struct ( cx. tcx , t) {
244
241
ty:: ty_fn ( _) | ty:: ty_native_fn ( _, _) {
245
- check returns_non_ty_var ( cx, t) ;
246
242
ret type_of_fn_from_ty ( cx, sp, t, * tpt. bounds ) ;
247
243
}
248
244
_ {
@@ -5300,7 +5296,6 @@ fn collect_native_item(ccx: @crate_ctxt,
5300
5296
ast : : native_abi_rust_intrinsic. {
5301
5297
// For intrinsics: link the function directly to the intrinsic
5302
5298
// function itself.
5303
- check returns_non_ty_var ( ccx, node_type) ;
5304
5299
let fn_type = type_of_fn_from_ty (
5305
5300
ccx, sp, node_type,
5306
5301
vec:: map ( tps, { |p| param_bounds ( ccx, p) } ) ) ;
0 commit comments