Skip to content

Commit d399098

Browse files
committed
Remove the push_unsafe! and pop_unsafe! macros.
This is a [breaking change].
1 parent 81b3b27 commit d399098

File tree

9 files changed

+2
-251
lines changed

9 files changed

+2
-251
lines changed

src/librustc_front/lowering.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,8 +1489,6 @@ pub fn lower_block_check_mode(_lctx: &LoweringContext, b: &BlockCheckMode) -> hi
14891489
match *b {
14901490
DefaultBlock => hir::DefaultBlock,
14911491
UnsafeBlock(u) => hir::UnsafeBlock(lower_unsafe_source(_lctx, u)),
1492-
PushUnsafeBlock(u) => hir::PushUnsafeBlock(lower_unsafe_source(_lctx, u)),
1493-
PopUnsafeBlock(u) => hir::PopUnsafeBlock(lower_unsafe_source(_lctx, u)),
14941492
}
14951493
}
14961494

src/libsyntax/ast.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,8 +765,6 @@ pub type SpannedIdent = Spanned<Ident>;
765765
pub enum BlockCheckMode {
766766
DefaultBlock,
767767
UnsafeBlock(UnsafeSource),
768-
PushUnsafeBlock(UnsafeSource),
769-
PopUnsafeBlock(UnsafeSource),
770768
}
771769

772770
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]

src/libsyntax/ext/base.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -544,12 +544,6 @@ fn initial_syntax_expander_table<'feat>(ecfg: &expand::ExpansionConfig<'feat>)
544544
syntax_expanders.insert(intern("cfg"),
545545
builtin_normal_expander(
546546
ext::cfg::expand_cfg));
547-
syntax_expanders.insert(intern("push_unsafe"),
548-
builtin_normal_expander(
549-
ext::pushpop_safe::expand_push_unsafe));
550-
syntax_expanders.insert(intern("pop_unsafe"),
551-
builtin_normal_expander(
552-
ext::pushpop_safe::expand_pop_unsafe));
553547
syntax_expanders.insert(intern("trace_macros"),
554548
builtin_normal_expander(
555549
ext::trace_macros::expand_trace_macros));

src/libsyntax/ext/pushpop_safe.rs

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/libsyntax/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ pub mod ext {
121121
pub mod log_syntax;
122122
pub mod mtwt;
123123
pub mod quote;
124-
pub mod pushpop_safe;
125124
pub mod source_util;
126125
pub mod trace_macros;
127126

src/libsyntax/print/pprust.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,8 +1671,8 @@ impl<'a> State<'a> {
16711671
attrs: &[ast::Attribute],
16721672
close_box: bool) -> io::Result<()> {
16731673
match blk.rules {
1674-
ast::UnsafeBlock(..) | ast::PushUnsafeBlock(..) => try!(self.word_space("unsafe")),
1675-
ast::DefaultBlock | ast::PopUnsafeBlock(..) => ()
1674+
ast::UnsafeBlock(..) => try!(self.word_space("unsafe")),
1675+
ast::DefaultBlock => ()
16761676
}
16771677
try!(self.maybe_print_comment(blk.span.lo));
16781678
try!(self.ann.pre(self, NodeBlock(blk)));

src/test/compile-fail/feature-gate-pushpop-unsafe.rs

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/test/compile-fail/pushpop-unsafe-rejects.rs

Lines changed: 0 additions & 74 deletions
This file was deleted.

src/test/run-pass/pushpop-unsafe-okay.rs

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)