make treatment of unchecked/unsafe blocks more uniform

also repair various errors in the parser related to such blocks.
rename checked_blk to default_blk to reflect the fact that it
inherits its purity from the surrounding context.
This commit is contained in:
Niko Matsakis 2011-10-07 15:51:55 -07:00 committed by Brian Anderson
parent e9569371f7
commit cbe8da0655
7 changed files with 28 additions and 20 deletions

View file

@ -184,7 +184,7 @@ fn mk_tests(cx: test_ctxt) -> @ast::item {
let test_descs = mk_test_desc_vec(cx);
let body_: ast::blk_ =
checked_block([], option::some(test_descs), cx.next_node_id());
default_block([], option::some(test_descs), cx.next_node_id());
let body = nospan(body_);
let fn_ = {decl: decl, proto: proto, body: body};
@ -303,7 +303,7 @@ fn mk_main(cx: test_ctxt) -> @ast::item {
let test_main_call_expr = mk_test_main_call(cx);
let body_: ast::blk_ =
checked_block([], option::some(test_main_call_expr),
default_block([], option::some(test_main_call_expr),
cx.next_node_id());
let body = {node: body_, span: dummy_sp()};