Teach the compiler to understand yield and join, as well as using task as a type name.
This commit is contained in:
parent
9daa00bf83
commit
84a56ed7cd
6 changed files with 6 additions and 2 deletions
|
|
@ -772,6 +772,7 @@ fn fold_ty(&ctxt cx, ty_fold fld, t ty_0) -> t {
|
|||
case (ty_str) { /* no-op */ }
|
||||
case (ty_type) { /* no-op */ }
|
||||
case (ty_native) { /* no-op */ }
|
||||
case (ty_task) { /* no-op */ }
|
||||
case (ty_box(?tm)) {
|
||||
ty = copy_cname(cx, mk_box(cx, rec(ty=fold_ty(cx, fld, tm.ty),
|
||||
mut=tm.mut)), ty);
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ fn ast_ty_to_ty(&ty::ctxt tcx, &ty_getter getter, &@ast::ty ast_ty) -> ty::t {
|
|||
case (ast::ty_vec(?mt)) {
|
||||
typ = ty::mk_vec(tcx, ast_mt_to_mt(tcx, getter, mt));
|
||||
}
|
||||
|
||||
case (ast::ty_task) { typ = ty::mk_task(tcx); }
|
||||
case (ast::ty_port(?t)) {
|
||||
typ = ty::mk_port(tcx, ast_ty_to_ty(tcx, getter, t));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ fn walk_ty(&ast_visitor v, @ast::ty t) {
|
|||
case (ast::ty_str) {}
|
||||
case (ast::ty_box(?mt)) { walk_ty(v, mt.ty); }
|
||||
case (ast::ty_vec(?mt)) { walk_ty(v, mt.ty); }
|
||||
case (ast::ty_task) {}
|
||||
case (ast::ty_port(?t)) { walk_ty(v, t); }
|
||||
case (ast::ty_chan(?t)) { walk_ty(v, t); }
|
||||
case (ast::ty_tup(?mts)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue