rustc: Implement parsing and typechecking for "once fn"
This commit is contained in:
@@ -524,10 +524,11 @@ 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, purity, bounds, decl) =>
|
||||
ty_fn(proto, purity,
|
||||
@vec::map(*bounds,
|
||||
|x| fold_ty_param_bound(*x, fld)),
|
||||
ty_fn(proto, purity, onceness, bounds, decl) =>
|
||||
ty_fn(proto,
|
||||
purity,
|
||||
onceness,
|
||||
@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)),
|
||||
|
||||
Reference in New Issue
Block a user