Skip to content

Commit 2d11a04

Browse files
committed
libsyntax: Remove 'unchecked_blk' from AST
1 parent c755449 commit 2d11a04

File tree

5 files changed

+2
-9
lines changed

5 files changed

+2
-9
lines changed

src/libsyntax/ast.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,16 +642,14 @@ type field_ = {mutbl: mutability, ident: ident, expr: @expr};
642642
type field = spanned<field_>;
643643

644644
#[auto_serialize]
645-
enum blk_check_mode { default_blk, unchecked_blk, unsafe_blk, }
645+
enum blk_check_mode { default_blk, unsafe_blk, }
646646

647647
impl blk_check_mode : cmp::Eq {
648648
pure fn eq(&&other: blk_check_mode) -> bool {
649649
match (self, other) {
650650
(default_blk, default_blk) => true,
651-
(unchecked_blk, unchecked_blk) => true,
652651
(unsafe_blk, unsafe_blk) => true,
653652
(default_blk, _) => false,
654-
(unchecked_blk, _) => false,
655653
(unsafe_blk, _) => false,
656654
}
657655
}

src/libsyntax/parse/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ use ast::{_mod, add, alt_check, alt_exhaustive, arg, arm, attribute,
6161
ty_box, ty_field, ty_fn, ty_infer, ty_mac, ty_method, ty_nil,
6262
ty_param, ty_param_bound, ty_path, ty_ptr, ty_rec, ty_rptr,
6363
ty_tup, ty_u32, ty_uniq, ty_vec, ty_fixed_length, type_value_ns,
64-
unchecked_blk, uniq, unnamed_field, unsafe_blk, unsafe_fn,
64+
uniq, unnamed_field, unsafe_blk, unsafe_fn,
6565
variant, view_item, view_item_, view_item_export,
6666
view_item_import, view_item_use, view_path, view_path_glob,
6767
view_path_list, view_path_simple, visibility, vstore, vstore_box,

src/libsyntax/print/pprust.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,6 @@ fn print_possibly_embedded_block_(s: ps, blk: ast::blk, embedded: embed_type,
857857
indented: uint, attrs: ~[ast::attribute],
858858
close_box: bool) {
859859
match blk.node.rules {
860-
ast::unchecked_blk => word(s.s, ~"unchecked"),
861860
ast::unsafe_blk => word(s.s, ~"unsafe"),
862861
ast::default_blk => ()
863862
}

src/rustc/middle/borrowck/check_loans.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,9 +673,6 @@ fn check_loans_in_block(blk: ast::blk,
673673
match blk.node.rules {
674674
ast::default_blk => {
675675
}
676-
ast::unchecked_blk => {
677-
self.declared_purity = ast::impure_fn;
678-
}
679676
ast::unsafe_blk => {
680677
self.declared_purity = ast::unsafe_fn;
681678
}

src/rustc/middle/typeck/check.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2168,7 +2168,6 @@ fn check_block_no_value(fcx: @fn_ctxt, blk: ast::blk) -> bool {
21682168

21692169
fn check_block(fcx0: @fn_ctxt, blk: ast::blk) -> bool {
21702170
let fcx = match blk.node.rules {
2171-
ast::unchecked_blk => @fn_ctxt {purity: ast::impure_fn,.. *fcx0},
21722171
ast::unsafe_blk => @fn_ctxt {purity: ast::unsafe_fn,.. *fcx0},
21732172
ast::default_blk => fcx0
21742173
};

0 commit comments

Comments
 (0)