Skip to content

Commit 6fb9d4f

Browse files
committed
Remove typeck::proto_to_ty_proto
1 parent f64d47a commit 6fb9d4f

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/comp/middle/typeck.rs

+2-10
Original file line numberDiff line numberDiff line change
@@ -473,14 +473,6 @@ mod write {
473473
}
474474
}
475475

476-
// Determine the proto for a fn type given the proto for its associated
477-
// code. This is needed because fn and lambda have fn type while iter
478-
// has iter type and block has block type. This may end up changing.
479-
fn proto_to_ty_proto(proto: ast::proto) -> ast::proto {
480-
// FIXME: This is no longer needed since fn@ and lambda have
481-
// the same type
482-
proto
483-
}
484476

485477
// Item collection - a pair of bootstrap passes:
486478
//
@@ -529,7 +521,7 @@ mod collect {
529521
out_constrs += [ty::ast_constr_to_constr(cx.tcx, constr)];
530522
}
531523
let t_fn =
532-
ty::mk_fn(cx.tcx, proto_to_ty_proto(proto), input_tys, output_ty,
524+
ty::mk_fn(cx.tcx, proto, input_tys, output_ty,
533525
decl.cf, out_constrs);
534526
let tpt = {kinds: ty_param_kinds(ty_params), ty: t_fn};
535527
alt def_id { some(did) { cx.tcx.tcache.insert(did, tpt); } _ { } }
@@ -584,7 +576,7 @@ mod collect {
584576
for constr: @ast::constr in m.node.meth.decl.constraints {
585577
out_constrs += [ty::ast_constr_to_constr(cx.tcx, constr)];
586578
}
587-
ret {proto: proto_to_ty_proto(m.node.meth.proto),
579+
ret {proto: m.node.meth.proto,
588580
ident: m.node.ident,
589581
inputs: inputs,
590582
output: output,

0 commit comments

Comments
 (0)