about summary refs log tree commit diff
path: root/src/libcore/macros.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-29 19:40:57 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-30 15:04:43 -0800
commit262c1efe6352a3e4dba4d8aebc4d9bd96849cd71 (patch)
tree4096f26993c2db2e0c95181170ef63f46cf3cb7e /src/libcore/macros.rs
parent023dfb0c898d851dee6ace2f8339b73b5287136b (diff)
Register new snapshots
Diffstat (limited to 'src/libcore/macros.rs')
-rw-r--r--src/libcore/macros.rs53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index 781dbb0e55a..e8fbd9d930f 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -10,8 +10,6 @@
 
 #![macro_escape]
 
-// NOTE(stage0): Remove cfg after a snapshot
-#[cfg(not(stage0))]
 /// Entry point of task panic, for details, see std::macros
 #[macro_export]
 macro_rules! panic {
@@ -32,44 +30,6 @@ macro_rules! panic {
     });
 }
 
-// NOTE(stage0): Remove macro after a snapshot
-#[cfg(stage0)]
-/// Entry point of task panic, for details, see std::macros
-#[macro_export]
-macro_rules! panic {
-    () => (
-        panic!("{}", "explicit panic")
-    );
-    ($msg:expr) => ({
-        static _MSG_FILE_LINE: (&'static str, &'static str, uint) = ($msg, file!(), line!());
-        ::core::panicking::panic(&_MSG_FILE_LINE)
-    });
-    ($fmt:expr, $($arg:tt)*) => ({
-        // a closure can't have return type !, so we need a full
-        // function to pass to format_args!, *and* we need the
-        // file and line numbers right here; so an inner bare fn
-        // is our only choice.
-        //
-        // LLVM doesn't tend to inline this, presumably because begin_unwind_fmt
-        // is #[cold] and #[inline(never)] and because this is flagged as cold
-        // as returning !. We really do want this to be inlined, however,
-        // because it's just a tiny wrapper. Small wins (156K to 149K in size)
-        // were seen when forcing this to be inlined, and that number just goes
-        // up with the number of calls to panic!()
-        //
-        // The leading _'s are to avoid dead code warnings if this is
-        // used inside a dead function. Just `#[allow(dead_code)]` is
-        // insufficient, since the user may have
-        // `#[forbid(dead_code)]` and which cannot be overridden.
-        #[inline(always)]
-        fn _run_fmt(fmt: &::std::fmt::Arguments) -> ! {
-            static _FILE_LINE: (&'static str, uint) = (file!(), line!());
-            ::core::panicking::panic_fmt(fmt, &_FILE_LINE)
-        }
-        format_args!(_run_fmt, $fmt, $($arg)*)
-    });
-}
-
 /// Runtime assertion, for details see std::macros
 #[macro_export]
 macro_rules! assert {
@@ -119,25 +79,12 @@ macro_rules! try {
     ($e:expr) => (match $e { Ok(e) => e, Err(e) => return Err(e) })
 }
 
-// NOTE(stage0): Remove cfg after a snapshot
-#[cfg(not(stage0))]
 /// Writing a formatted string into a writer
 #[macro_export]
 macro_rules! write {
     ($dst:expr, $($arg:tt)*) => ((&mut *$dst).write_fmt(format_args!($($arg)*)))
 }
 
-// NOTE(stage0): Remove macro after a snapshot
-#[cfg(stage0)]
-/// Writing a formatted string into a writer
-#[macro_export]
-macro_rules! write {
-    ($dst:expr, $($arg:tt)*) => ({
-        let dst = &mut *$dst;
-        format_args!(|args| { dst.write_fmt(args) }, $($arg)*)
-    })
-}
-
 /// Writing a formatted string plus a newline into a writer
 #[macro_export]
 macro_rules! writeln {