From 6b6d15ac206e599509ebc40c39270877bf77c000 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Thu, 28 Feb 2013 20:30:16 -0800 Subject: [PATCH] Remove code that was awaiting a snapshot * Disallow structural records everywhere * Remove all #[cfg(stage0)] stuff * Remove the last deprecated modes in libcore * Un-xfail a test --- src/libcore/comm.rs | 3 --- src/libcore/core.rc | 4 ---- src/libcore/pipes.rs | 2 -- src/libcore/private/finally.rs | 23 ----------------------- src/libcore/stackwalk.rs | 3 --- src/librustc/middle/trans/common.rs | 5 +---- src/libstd/test.rs | 24 ------------------------ src/test/pretty/record-trailing-comma.rs | 3 --- src/test/run-pass/pipe-select-macro.rs | 2 -- 9 files changed, 1 insertion(+), 68 deletions(-) diff --git a/src/libcore/comm.rs b/src/libcore/comm.rs index da69cd984cd..b0825816626 100644 --- a/src/libcore/comm.rs +++ b/src/libcore/comm.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Transitional -- needs snapshot -#[allow(structural_records)]; - use either::{Either, Left, Right}; use kinds::Owned; use option; diff --git a/src/libcore/core.rc b/src/libcore/core.rc index ed18388f578..91eb61e342e 100644 --- a/src/libcore/core.rc +++ b/src/libcore/core.rc @@ -227,10 +227,6 @@ pub const debug : u32 = 4_u32; // The runtime interface used by the compiler #[cfg(notest)] pub mod rt; -// The runtime and compiler interface to fmt! -#[cfg(stage0)] -#[path = "private/extfmt.rs"] -pub mod extfmt; // Private APIs pub mod private; diff --git a/src/libcore/pipes.rs b/src/libcore/pipes.rs index 6389ec08615..77554656913 100644 --- a/src/libcore/pipes.rs +++ b/src/libcore/pipes.rs @@ -82,8 +82,6 @@ */ -#[allow(structural_records)]; // Macros -- needs another snapshot - use cmp::Eq; use cast::{forget, reinterpret_cast, transmute}; use cell::Cell; diff --git a/src/libcore/private/finally.rs b/src/libcore/private/finally.rs index af7197159ca..ff75963511c 100644 --- a/src/libcore/private/finally.rs +++ b/src/libcore/private/finally.rs @@ -26,33 +26,10 @@ use ops::Drop; use task::{spawn, failing}; -#[cfg(stage0)] -pub trait Finally { - fn finally(&self, +dtor: &fn()) -> T; -} - -#[cfg(stage1)] -#[cfg(stage2)] -#[cfg(stage3)] pub trait Finally { fn finally(&self, dtor: &fn()) -> T; } -#[cfg(stage0)] -impl Finally for &fn() -> T { - // FIXME #4518: Should not require a mode here - fn finally(&self, +dtor: &fn()) -> T { - let _d = Finallyalizer { - dtor: dtor - }; - - (*self)() - } -} - -#[cfg(stage1)] -#[cfg(stage2)] -#[cfg(stage3)] impl Finally for &fn() -> T { fn finally(&self, dtor: &fn()) -> T { let _d = Finallyalizer { diff --git a/src/libcore/stackwalk.rs b/src/libcore/stackwalk.rs index 2e24df86c78..8950a1d0c02 100644 --- a/src/libcore/stackwalk.rs +++ b/src/libcore/stackwalk.rs @@ -10,9 +10,6 @@ #[doc(hidden)]; // FIXME #3538 -#[legacy_modes]; // tjc: remove after snapshot -#[allow(deprecated_mode)]; - use cast::reinterpret_cast; use ptr::offset; use sys::size_of; diff --git a/src/librustc/middle/trans/common.rs b/src/librustc/middle/trans/common.rs index 5ce20ac23bc..97f8ec84a1d 100644 --- a/src/librustc/middle/trans/common.rs +++ b/src/librustc/middle/trans/common.rs @@ -553,10 +553,7 @@ fn info(&self) -> Option { } } -// XXX: Work around a trait parsing bug. remove after snapshot -pub type optional_boxed_ast_expr = Option<@ast::expr>; - -impl get_node_info for optional_boxed_ast_expr { +impl get_node_info for Option<@ast::expr> { fn info(&self) -> Option { self.chain_ref(|s| s.info()) } diff --git a/src/libstd/test.rs b/src/libstd/test.rs index bfeaf8400bc..49a8dff4a96 100644 --- a/src/libstd/test.rs +++ b/src/libstd/test.rs @@ -46,34 +46,10 @@ // colons. This way if some test runner wants to arrange the tests // hierarchically it may. -#[cfg(stage0)] -pub enum TestName { - // Stage0 doesn't understand sendable &static/str yet - StaticTestName(&static/[u8]), - DynTestName(~str) -} - -#[cfg(stage0)] -impl ToStr for TestName { - pure fn to_str(&self) -> ~str { - match self { - &StaticTestName(s) => str::from_bytes(s), - &DynTestName(s) => s.to_str() - } - } -} - -#[cfg(stage1)] -#[cfg(stage2)] -#[cfg(stage3)] pub enum TestName { StaticTestName(&static/str), DynTestName(~str) } - -#[cfg(stage1)] -#[cfg(stage2)] -#[cfg(stage3)] impl ToStr for TestName { pure fn to_str(&self) -> ~str { match self { diff --git a/src/test/pretty/record-trailing-comma.rs b/src/test/pretty/record-trailing-comma.rs index ace5da8eb4e..8c6afb7879d 100644 --- a/src/test/pretty/record-trailing-comma.rs +++ b/src/test/pretty/record-trailing-comma.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// NOTE this is a pretty-printer bug that I fixed, but it's -// not in the snapshot yet. After a new snapshot, can un-xfail -// xfail-pretty // pp-exact struct Thing { x: int, diff --git a/src/test/run-pass/pipe-select-macro.rs b/src/test/run-pass/pipe-select-macro.rs index 368cda63394..a77e6acbb25 100644 --- a/src/test/run-pass/pipe-select-macro.rs +++ b/src/test/run-pass/pipe-select-macro.rs @@ -8,9 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// tjc: un-xfail after snapshot // xfail-test -// xfail-pretty // Protocols proto! foo ( -- GitLab