rustc: Parse and stub (broken) typechecking for bounded function types

This commit is contained in:
Patrick Walton
2012-08-06 18:54:20 -07:00
parent c0f7ed68e2
commit 60f47eabe2
17 changed files with 119 additions and 72 deletions

View File

@@ -514,7 +514,10 @@ fn noop_fold_ty(t: ty_, fld: ast_fold) -> ty_ {
ty_ptr(mt) => ty_ptr(fold_mt(mt, fld)),
ty_rptr(region, mt) => ty_rptr(region, fold_mt(mt, fld)),
ty_rec(fields) => ty_rec(vec::map(fields, |f| fold_field(f, fld))),
ty_fn(proto, decl) => ty_fn(proto, fold_fn_decl(decl, fld)),
ty_fn(proto, bounds, decl) =>
ty_fn(proto, @vec::map(*bounds,
|x| fold_ty_param_bound(x, fld)),
fold_fn_decl(decl, fld)),
ty_tup(tys) => ty_tup(vec::map(tys, |ty| fld.fold_ty(ty))),
ty_path(path, id) => ty_path(fld.fold_path(path), fld.new_id(id)),
ty_fixed_length(t, vs) => ty_fixed_length(fld.fold_ty(t), vs),