Skip to content

Commit a660bb3

Browse files
committed
auto merge of #5180 : catamorphism/rust/post-snapshot, r=catamorphism
* Disallow structural records everywhere * Remove all #[cfg(stage0)] stuff * Remove the last deprecated modes in libcore * Un-xfail a test
2 parents b7e7297 + d66a3dd commit a660bb3

File tree

9 files changed

+2
-68
lines changed

9 files changed

+2
-68
lines changed

src/libcore/comm.rs

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// Transitional -- needs snapshot
12-
#[allow(structural_records)];
13-
1411
use either::{Either, Left, Right};
1512
use kinds::Owned;
1613
use option;

src/libcore/core.rc

-4
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,6 @@ pub const debug : u32 = 4_u32;
227227

228228
// The runtime interface used by the compiler
229229
#[cfg(notest)] pub mod rt;
230-
// The runtime and compiler interface to fmt!
231-
#[cfg(stage0)]
232-
#[path = "private/extfmt.rs"]
233-
pub mod extfmt;
234230
// Private APIs
235231
pub mod private;
236232

src/libcore/pipes.rs

-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ bounded and unbounded protocols allows for less code duplication.
8282
8383
*/
8484

85-
#[allow(structural_records)]; // Macros -- needs another snapshot
86-
8785
use cmp::Eq;
8886
use cast::{forget, reinterpret_cast, transmute};
8987
use cell::Cell;

src/libcore/private/finally.rs

-23
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,10 @@ do || {
2626
use ops::Drop;
2727
use task::{spawn, failing};
2828

29-
#[cfg(stage0)]
30-
pub trait Finally<T> {
31-
fn finally(&self, +dtor: &fn()) -> T;
32-
}
33-
34-
#[cfg(stage1)]
35-
#[cfg(stage2)]
36-
#[cfg(stage3)]
3729
pub trait Finally<T> {
3830
fn finally(&self, dtor: &fn()) -> T;
3931
}
4032

41-
#[cfg(stage0)]
42-
impl<T> Finally<T> for &fn() -> T {
43-
// FIXME #4518: Should not require a mode here
44-
fn finally(&self, +dtor: &fn()) -> T {
45-
let _d = Finallyalizer {
46-
dtor: dtor
47-
};
48-
49-
(*self)()
50-
}
51-
}
52-
53-
#[cfg(stage1)]
54-
#[cfg(stage2)]
55-
#[cfg(stage3)]
5633
impl<T> Finally<T> for &fn() -> T {
5734
fn finally(&self, dtor: &fn()) -> T {
5835
let _d = Finallyalizer {

src/libcore/stackwalk.rs

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
#[doc(hidden)]; // FIXME #3538
1212

13-
#[legacy_modes]; // tjc: remove after snapshot
14-
#[allow(deprecated_mode)];
15-
1613
use cast::reinterpret_cast;
1714
use ptr::offset;
1815
use sys::size_of;

src/librustc/middle/trans/common.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,7 @@ impl get_node_info for ast::blk {
553553
}
554554
}
555555

556-
// XXX: Work around a trait parsing bug. remove after snapshot
557-
pub type optional_boxed_ast_expr = Option<@ast::expr>;
558-
559-
impl get_node_info for optional_boxed_ast_expr {
556+
impl get_node_info for Option<@ast::expr> {
560557
fn info(&self) -> Option<NodeInfo> {
561558
self.chain_ref(|s| s.info())
562559
}

src/libstd/test.rs

-24
Original file line numberDiff line numberDiff line change
@@ -46,34 +46,10 @@ extern mod rustrt {
4646
// colons. This way if some test runner wants to arrange the tests
4747
// hierarchically it may.
4848

49-
#[cfg(stage0)]
50-
pub enum TestName {
51-
// Stage0 doesn't understand sendable &static/str yet
52-
StaticTestName(&static/[u8]),
53-
DynTestName(~str)
54-
}
55-
56-
#[cfg(stage0)]
57-
impl ToStr for TestName {
58-
pure fn to_str(&self) -> ~str {
59-
match self {
60-
&StaticTestName(s) => str::from_bytes(s),
61-
&DynTestName(s) => s.to_str()
62-
}
63-
}
64-
}
65-
66-
#[cfg(stage1)]
67-
#[cfg(stage2)]
68-
#[cfg(stage3)]
6949
pub enum TestName {
7050
StaticTestName(&static/str),
7151
DynTestName(~str)
7252
}
73-
74-
#[cfg(stage1)]
75-
#[cfg(stage2)]
76-
#[cfg(stage3)]
7753
impl ToStr for TestName {
7854
pure fn to_str(&self) -> ~str {
7955
match self {

src/test/pretty/record-trailing-comma.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// NOTE this is a pretty-printer bug that I fixed, but it's
12-
// not in the snapshot yet. After a new snapshot, can un-xfail
13-
// xfail-pretty
11+
// xfail-test
1412
// pp-exact
1513
struct Thing {
1614
x: int,

src/test/run-pass/pipe-select-macro.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// tjc: un-xfail after snapshot
1211
// xfail-test
13-
// xfail-pretty
1412

1513
// Protocols
1614
proto! foo (

0 commit comments

Comments
 (0)