Skip to content

Commit b5a7e8b

Browse files
committed
desnapshot
1 parent 202b8dc commit b5a7e8b

File tree

13 files changed

+8
-125
lines changed

13 files changed

+8
-125
lines changed

src/libcore/core.rc

-3
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ they contained the following prologue:
7575

7676
pub use kinds::{Const, Copy, Owned, Durable};
7777
pub use ops::{Drop};
78-
#[cfg(stage0)]
79-
pub use ops::{Add, Sub, Mul, Div, Modulo, Neg, Not};
80-
#[cfg(not(stage0))]
8178
pub use ops::{Add, Sub, Mul, Quot, Rem, Neg, Not};
8279
pub use ops::{BitAnd, BitOr, BitXor};
8380
pub use ops::{Shl, Shr, Index};

src/libcore/num/f32.rs

+2-14
Original file line numberDiff line numberDiff line change
@@ -278,24 +278,12 @@ impl Mul<f32,f32> for f32 {
278278
#[inline(always)]
279279
fn mul(&self, other: &f32) -> f32 { *self * *other }
280280
}
281-
282-
#[cfg(stage0,notest)]
283-
impl Div<f32,f32> for f32 {
284-
#[inline(always)]
285-
fn div(&self, other: &f32) -> f32 { *self / *other }
286-
}
287-
#[cfg(not(stage0),notest)]
281+
#[cfg(notest)]
288282
impl Quot<f32,f32> for f32 {
289283
#[inline(always)]
290284
fn quot(&self, other: &f32) -> f32 { *self / *other }
291285
}
292-
293-
#[cfg(stage0,notest)]
294-
impl Modulo<f32,f32> for f32 {
295-
#[inline(always)]
296-
fn modulo(&self, other: &f32) -> f32 { *self % *other }
297-
}
298-
#[cfg(not(stage0),notest)]
286+
#[cfg(notest)]
299287
impl Rem<f32,f32> for f32 {
300288
#[inline(always)]
301289
fn rem(&self, other: &f32) -> f32 { *self % *other }

src/libcore/num/f64.rs

+2-10
Original file line numberDiff line numberDiff line change
@@ -296,20 +296,12 @@ impl Sub<f64,f64> for f64 {
296296
impl Mul<f64,f64> for f64 {
297297
fn mul(&self, other: &f64) -> f64 { *self * *other }
298298
}
299-
#[cfg(stage0,notest)]
300-
impl Div<f64,f64> for f64 {
301-
fn div(&self, other: &f64) -> f64 { *self / *other }
302-
}
303-
#[cfg(not(stage0),notest)]
299+
#[cfg(notest)]
304300
impl Quot<f64,f64> for f64 {
305301
#[inline(always)]
306302
fn quot(&self, other: &f64) -> f64 { *self / *other }
307303
}
308-
#[cfg(stage0,notest)]
309-
impl Modulo<f64,f64> for f64 {
310-
fn modulo(&self, other: &f64) -> f64 { *self % *other }
311-
}
312-
#[cfg(not(stage0),notest)]
304+
#[cfg(notest)]
313305
impl Rem<f64,f64> for f64 {
314306
#[inline(always)]
315307
fn rem(&self, other: &f64) -> f64 { *self % *other }

src/libcore/num/float.rs

+2-13
Original file line numberDiff line numberDiff line change
@@ -691,23 +691,12 @@ impl Mul<float,float> for float {
691691
#[inline(always)]
692692
fn mul(&self, other: &float) -> float { *self * *other }
693693
}
694-
695-
#[cfg(stage0,notest)]
696-
impl Div<float,float> for float {
697-
#[inline(always)]
698-
fn div(&self, other: &float) -> float { *self / *other }
699-
}
700-
#[cfg(not(stage0),notest)]
694+
#[cfg(notest)]
701695
impl Quot<float,float> for float {
702696
#[inline(always)]
703697
fn quot(&self, other: &float) -> float { *self / *other }
704698
}
705-
#[cfg(stage0,notest)]
706-
impl Modulo<float,float> for float {
707-
#[inline(always)]
708-
fn modulo(&self, other: &float) -> float { *self % *other }
709-
}
710-
#[cfg(not(stage0),notest)]
699+
#[cfg(notest)]
711700
impl Rem<float,float> for float {
712701
#[inline(always)]
713702
fn rem(&self, other: &float) -> float { *self % *other }

src/libcore/num/int-template.rs

-14
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,6 @@ impl Mul<T,T> for T {
200200
#[inline(always)]
201201
fn mul(&self, other: &T) -> T { *self * *other }
202202
}
203-
204-
#[cfg(stage0,notest)]
205-
impl Div<T,T> for T {
206-
#[inline(always)]
207-
fn div(&self, other: &T) -> T { *self / *other }
208-
}
209-
#[cfg(not(stage0),notest)]
210203
impl Quot<T,T> for T {
211204
///
212205
/// Returns the integer quotient, truncated towards 0. As this behaviour reflects
@@ -229,13 +222,6 @@ impl Quot<T,T> for T {
229222
#[inline(always)]
230223
fn quot(&self, other: &T) -> T { *self / *other }
231224
}
232-
233-
#[cfg(stage0,notest)]
234-
impl Modulo<T,T> for T {
235-
#[inline(always)]
236-
fn modulo(&self, other: &T) -> T { *self % *other }
237-
}
238-
#[cfg(not(stage0),notest)]
239225
impl Rem<T,T> for T {
240226
///
241227
/// Returns the integer remainder after division, satisfying:

src/libcore/num/num.rs

+2-26
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@
1010

1111
//! An interface for numeric types
1212
use cmp::{Eq, Ord};
13-
#[cfg(stage0)]
14-
use ops::{Add, Sub, Mul, Neg};
15-
#[cfg(stage0)]
16-
use Quot = ops::Div;
17-
#[cfg(stage0)]
18-
use Rem = ops::Modulo;
19-
#[cfg(not(stage0))]
2013
use ops::{Add, Sub, Mul, Quot, Rem, Neg};
2114
use ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr};
2215
use option::Option;
@@ -391,25 +384,8 @@ pub fn pow_with_uint<T:NumCast+One+Zero+Copy+Quot<T,T>+Mul<T,T>>(
391384
total
392385
}
393386

394-
/// Helper function for testing numeric operations
395-
#[cfg(stage0,test)]
396-
pub fn test_num<T:Num + NumCast>(ten: T, two: T) {
397-
assert_eq!(ten.add(&two), cast(12));
398-
assert_eq!(ten.sub(&two), cast(8));
399-
assert_eq!(ten.mul(&two), cast(20));
400-
assert_eq!(ten.div(&two), cast(5));
401-
assert_eq!(ten.modulo(&two), cast(0));
402-
403-
assert_eq!(ten.add(&two), ten + two);
404-
assert_eq!(ten.sub(&two), ten - two);
405-
assert_eq!(ten.mul(&two), ten * two);
406-
assert_eq!(ten.div(&two), ten / two);
407-
assert_eq!(ten.modulo(&two), ten % two);
408-
}
409-
#[cfg(stage1,test)]
410-
#[cfg(stage2,test)]
411-
#[cfg(stage3,test)]
412-
pub fn test_num<T:Num + NumCast>(ten: T, two: T) {
387+
#[cfg(test)]
388+
fn test_num<T:Num + NumCast>(ten: T, two: T) {
413389
assert_eq!(ten.add(&two), cast(12));
414390
assert_eq!(ten.sub(&two), cast(8));
415391
assert_eq!(ten.mul(&two), cast(20));

src/libcore/num/strconv.rs

-9
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@
99
// except according to those terms.
1010

1111
use core::cmp::{Ord, Eq};
12-
#[cfg(stage0)]
13-
use ops::{Add, Sub, Mul, Neg};
14-
#[cfg(stage0)]
15-
use Quot = ops::Div;
16-
#[cfg(stage0)]
17-
use Rem = ops::Modulo;
18-
#[cfg(stage1)]
19-
#[cfg(stage2)]
20-
#[cfg(stage3)]
2112
use ops::{Add, Sub, Mul, Quot, Rem, Neg};
2213
use option::{None, Option, Some};
2314
use char;

src/libcore/num/uint-template.rs

-14
Original file line numberDiff line numberDiff line change
@@ -165,24 +165,10 @@ impl Mul<T,T> for T {
165165
#[inline(always)]
166166
fn mul(&self, other: &T) -> T { *self * *other }
167167
}
168-
169-
#[cfg(stage0,notest)]
170-
impl Div<T,T> for T {
171-
#[inline(always)]
172-
fn div(&self, other: &T) -> T { *self / *other }
173-
}
174-
#[cfg(not(stage0),notest)]
175168
impl Quot<T,T> for T {
176169
#[inline(always)]
177170
fn quot(&self, other: &T) -> T { *self / *other }
178171
}
179-
180-
#[cfg(stage0,notest)]
181-
impl Modulo<T,T> for T {
182-
#[inline(always)]
183-
fn modulo(&self, other: &T) -> T { *self % *other }
184-
}
185-
#[cfg(not(stage0),notest)]
186172
impl Rem<T,T> for T {
187173
#[inline(always)]
188174
fn rem(&self, other: &T) -> T { *self % *other }

src/libcore/ops.rs

-12
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,12 @@ pub trait Mul<RHS,Result> {
3030
fn mul(&self, rhs: &RHS) -> Result;
3131
}
3232

33-
#[lang="div"]
34-
#[cfg(stage0)]
35-
pub trait Div<RHS,Result> {
36-
fn div(&self, rhs: &RHS) -> Result;
37-
}
3833
#[lang="quot"]
39-
#[cfg(not(stage0))]
4034
pub trait Quot<RHS,Result> {
4135
fn quot(&self, rhs: &RHS) -> Result;
4236
}
4337

44-
#[lang="modulo"]
45-
#[cfg(stage0)]
46-
pub trait Modulo<RHS,Result> {
47-
fn modulo(&self, rhs: &RHS) -> Result;
48-
}
4938
#[lang="rem"]
50-
#[cfg(not(stage0))]
5139
pub trait Rem<RHS,Result> {
5240
fn rem(&self, rhs: &RHS) -> Result;
5341
}

src/libcore/prelude.rs

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
pub use either::{Either, Left, Right};
1616
pub use kinds::{Const, Copy, Owned, Durable};
17-
#[cfg(stage0)]
18-
pub use ops::{Add, Sub, Mul, Div, Modulo, Neg, Not};
19-
#[cfg(not(stage0))]
2017
pub use ops::{Add, Sub, Mul, Quot, Rem, Neg, Not};
2118
pub use ops::{BitAnd, BitOr, BitXor};
2219
pub use ops::{Drop};

src/libcore/repr.rs

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use io::{Writer, WriterUtil};
2323
use libc::c_void;
2424
use managed;
2525
use ptr;
26-
#[cfg(stage0)] use sys;
2726
use reflect;
2827
use reflect::{MovePtr, align};
2928
use to_str::ToStr;

src/libcore/rt/io/mod.rs

-3
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,15 @@ pub mod file;
125125
pub mod net;
126126

127127
/// Readers and Writers for memory buffers and strings.
128-
#[cfg(not(stage0))] // XXX Using unsnapshotted features
129128
pub mod mem;
130129

131130
/// Non-blocking access to stdin, stdout, stderr
132131
pub mod stdio;
133132

134133
/// Basic stream compression. XXX: Belongs with other flate code
135-
#[cfg(not(stage0))] // XXX Using unsnapshotted features
136134
pub mod flate;
137135

138136
/// Interop between byte streams and pipes. Not sure where it belongs
139-
#[cfg(not(stage0))] // XXX "
140137
pub mod comm_adapters;
141138

142139
/// Extension traits

src/libstd/std.rc

-3
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,10 @@ pub mod cmp;
9191
pub mod base64;
9292
pub mod rl;
9393
pub mod workcache;
94-
#[cfg(not(stage0))]
9594
#[path="num/bigint.rs"]
9695
pub mod bigint;
97-
#[cfg(not(stage0))]
9896
#[path="num/rational.rs"]
9997
pub mod rational;
100-
#[cfg(not(stage0))]
10198
#[path="num/complex.rs"]
10299
pub mod complex;
103100
pub mod stats;

0 commit comments

Comments
 (0)