@@ -115,8 +115,7 @@ fn type_of_fn(cx: @crate_ctxt, sp: span, is_method: bool, inputs: [ty::arg],
115115
116116// Given a function type and a count of ty params, construct an llvm type
117117fn 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 {
120119 // FIXME: Check should be unnecessary, b/c it's implied
121120 // by returns_non_ty_var(t). Make that a postcondition
122121 // (see Issue #586)
@@ -173,8 +172,6 @@ fn type_of_inner(cx: @crate_ctxt, sp: span, t: ty::t)
173172 T_struct ( tys)
174173 }
175174 ty:: ty_fn ( _) {
176- // FIXME: could be a constraint on ty_fn
177- check returns_non_ty_var ( cx, t) ;
178175 T_fn_pair ( cx, type_of_fn_from_ty ( cx, sp, t, [ ] ) )
179176 }
180177 ty:: ty_native_fn ( args, out) {
@@ -242,7 +239,6 @@ fn type_of_ty_param_bounds_and_ty(lcx: @local_ctxt, sp: span,
242239 let t = tpt. ty ;
243240 alt ty:: struct ( cx. tcx , t) {
244241 ty:: ty_fn ( _) | ty:: ty_native_fn ( _, _) {
245- check returns_non_ty_var ( cx, t) ;
246242 ret type_of_fn_from_ty ( cx, sp, t, * tpt. bounds ) ;
247243 }
248244 _ {
@@ -5300,7 +5296,6 @@ fn collect_native_item(ccx: @crate_ctxt,
53005296 ast : : native_abi_rust_intrinsic. {
53015297 // For intrinsics: link the function directly to the intrinsic
53025298 // function itself.
5303- check returns_non_ty_var ( ccx, node_type) ;
53045299 let fn_type = type_of_fn_from_ty (
53055300 ccx, sp, node_type,
53065301 vec:: map ( tps, { |p| param_bounds ( ccx, p) } ) ) ;
0 commit comments