aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2010-10-28 15:04:48 -0700
committerPatrick Walton <[email protected]>2010-10-28 15:04:48 -0700
commitb914e0e74cd2e32f063cc5f90c066d55eaf88619 (patch)
tree6315b0e2de71df510087f7b840467dd2fb4ee6c0 /src/boot
parentrustboot: Emit an error instead of asserting in trans when a T is passed by v... (diff)
downloadrust-b914e0e74cd2e32f063cc5f90c066d55eaf88619.tar.xz
rust-b914e0e74cd2e32f063cc5f90c066d55eaf88619.zip
Revert "rustboot: Emit an error instead of asserting in trans when a T is passed by value" due to test failures
This reverts commit ee901858a27bf00c7dd66e7cfecb9dd97029dba8.
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/me/type.ml21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/boot/me/type.ml b/src/boot/me/type.ml
index 21aecaf1..2ff5e128 100644
--- a/src/boot/me/type.ml
+++ b/src/boot/me/type.ml
@@ -1308,23 +1308,6 @@ let process_crate (cx:Semant.ctxt) (crate:Ast.crate) : unit =
Common.err (Some item_id) "this function must return a value"
in
- let check_fn_ty_validity item_id (ty_sig, _) =
- let check_input_slot i slot =
- match slot with
- {
- Ast.slot_ty = Some (Ast.TY_param _);
- Ast.slot_mode = Ast.MODE_local
- } ->
- Common.err
- (Some item_id)
- "parameter %d of this type-parametric function must be \
- passed by reference, not by value"
- (i + 1)
- | _ -> ()
- in
- Array.iteri check_input_slot ty_sig.Ast.sig_input_slots
- in
-
let visit_mod_item_pre _ _ item =
let { Common.node = item; Common.id = item_id } = item in
match item.Ast.decl_item with
@@ -1333,9 +1316,7 @@ let process_crate (cx:Semant.ctxt) (crate:Ast.crate) : unit =
let fn_ty = Hashtbl.find cx.Semant.ctxt_all_item_types item_id in
begin
match fn_ty with
- Ast.TY_fn ty_fn ->
- check_fn_ty_validity item_id ty_fn;
- push_fn_ctx_of_ty_fn ty_fn
+ Ast.TY_fn ty_fn -> push_fn_ctx_of_ty_fn ty_fn
| _ ->
Common.bug ()
"Type.visit_mod_item_pre: fn item didn't have a fn type"