Skip to content

Commit

Permalink
Remove the push_unsafe! and pop_unsafe! macros.
Browse files Browse the repository at this point in the history
This is a [breaking change].
  • Loading branch information
nrc committed Oct 12, 2015
1 parent 81b3b27 commit d399098
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 251 deletions.
2 changes: 0 additions & 2 deletions src/librustc_front/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1489,8 +1489,6 @@ pub fn lower_block_check_mode(_lctx: &LoweringContext, b: &BlockCheckMode) -> hi
match *b {
DefaultBlock => hir::DefaultBlock,
UnsafeBlock(u) => hir::UnsafeBlock(lower_unsafe_source(_lctx, u)),
PushUnsafeBlock(u) => hir::PushUnsafeBlock(lower_unsafe_source(_lctx, u)),
PopUnsafeBlock(u) => hir::PopUnsafeBlock(lower_unsafe_source(_lctx, u)),
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/libsyntax/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,6 @@ pub type SpannedIdent = Spanned<Ident>;
pub enum BlockCheckMode {
DefaultBlock,
UnsafeBlock(UnsafeSource),
PushUnsafeBlock(UnsafeSource),
PopUnsafeBlock(UnsafeSource),
}

#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
Expand Down
6 changes: 0 additions & 6 deletions src/libsyntax/ext/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,12 +544,6 @@ fn initial_syntax_expander_table<'feat>(ecfg: &expand::ExpansionConfig<'feat>)
syntax_expanders.insert(intern("cfg"),
builtin_normal_expander(
ext::cfg::expand_cfg));
syntax_expanders.insert(intern("push_unsafe"),
builtin_normal_expander(
ext::pushpop_safe::expand_push_unsafe));
syntax_expanders.insert(intern("pop_unsafe"),
builtin_normal_expander(
ext::pushpop_safe::expand_pop_unsafe));
syntax_expanders.insert(intern("trace_macros"),
builtin_normal_expander(
ext::trace_macros::expand_trace_macros));
Expand Down
94 changes: 0 additions & 94 deletions src/libsyntax/ext/pushpop_safe.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/libsyntax/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ pub mod ext {
pub mod log_syntax;
pub mod mtwt;
pub mod quote;
pub mod pushpop_safe;
pub mod source_util;
pub mod trace_macros;

Expand Down
4 changes: 2 additions & 2 deletions src/libsyntax/print/pprust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1671,8 +1671,8 @@ impl<'a> State<'a> {
attrs: &[ast::Attribute],
close_box: bool) -> io::Result<()> {
match blk.rules {
ast::UnsafeBlock(..) | ast::PushUnsafeBlock(..) => try!(self.word_space("unsafe")),
ast::DefaultBlock | ast::PopUnsafeBlock(..) => ()
ast::UnsafeBlock(..) => try!(self.word_space("unsafe")),
ast::DefaultBlock => ()
}
try!(self.maybe_print_comment(blk.span.lo));
try!(self.ann.pre(self, NodeBlock(blk)));
Expand Down
14 changes: 0 additions & 14 deletions src/test/compile-fail/feature-gate-pushpop-unsafe.rs

This file was deleted.

74 changes: 0 additions & 74 deletions src/test/compile-fail/pushpop-unsafe-rejects.rs

This file was deleted.

56 changes: 0 additions & 56 deletions src/test/run-pass/pushpop-unsafe-okay.rs

This file was deleted.

0 comments on commit d399098

Please sign in to comment.