libsyntax: Remove 'unchecked_blk' from AST

This commit is contained in:
Brian Anderson 2012-09-18 11:51:06 -07:00
parent c755449fd6
commit 2d11a04e74
5 changed files with 2 additions and 9 deletions

View File

@ -642,16 +642,14 @@ type field_ = {mutbl: mutability, ident: ident, expr: @expr};
type field = spanned<field_>;
#[auto_serialize]
enum blk_check_mode { default_blk, unchecked_blk, unsafe_blk, }
enum blk_check_mode { default_blk, unsafe_blk, }
impl blk_check_mode : cmp::Eq {
pure fn eq(&&other: blk_check_mode) -> bool {
match (self, other) {
(default_blk, default_blk) => true,
(unchecked_blk, unchecked_blk) => true,
(unsafe_blk, unsafe_blk) => true,
(default_blk, _) => false,
(unchecked_blk, _) => false,
(unsafe_blk, _) => false,
}
}

View File

@ -61,7 +61,7 @@ use ast::{_mod, add, alt_check, alt_exhaustive, arg, arm, attribute,
ty_box, ty_field, ty_fn, ty_infer, ty_mac, ty_method, ty_nil,
ty_param, ty_param_bound, ty_path, ty_ptr, ty_rec, ty_rptr,
ty_tup, ty_u32, ty_uniq, ty_vec, ty_fixed_length, type_value_ns,
unchecked_blk, uniq, unnamed_field, unsafe_blk, unsafe_fn,
uniq, unnamed_field, unsafe_blk, unsafe_fn,
variant, view_item, view_item_, view_item_export,
view_item_import, view_item_use, view_path, view_path_glob,
view_path_list, view_path_simple, visibility, vstore, vstore_box,

View File

@ -857,7 +857,6 @@ fn print_possibly_embedded_block_(s: ps, blk: ast::blk, embedded: embed_type,
indented: uint, attrs: ~[ast::attribute],
close_box: bool) {
match blk.node.rules {
ast::unchecked_blk => word(s.s, ~"unchecked"),
ast::unsafe_blk => word(s.s, ~"unsafe"),
ast::default_blk => ()
}

View File

@ -673,9 +673,6 @@ fn check_loans_in_block(blk: ast::blk,
match blk.node.rules {
ast::default_blk => {
}
ast::unchecked_blk => {
self.declared_purity = ast::impure_fn;
}
ast::unsafe_blk => {
self.declared_purity = ast::unsafe_fn;
}

View File

@ -2168,7 +2168,6 @@ fn check_block_no_value(fcx: @fn_ctxt, blk: ast::blk) -> bool {
fn check_block(fcx0: @fn_ctxt, blk: ast::blk) -> bool {
let fcx = match blk.node.rules {
ast::unchecked_blk => @fn_ctxt {purity: ast::impure_fn,.. *fcx0},
ast::unsafe_blk => @fn_ctxt {purity: ast::unsafe_fn,.. *fcx0},
ast::default_blk => fcx0
};