Skip to content

Commit 95a0014

Browse files
author
Steven Stewart-Gallus
committed
---
yaml --- r: 60143 b: refs/heads/master c: 72c9aab h: refs/heads/master i: 60141: 800b841 60139: 477089f 60135: 13d8428 60127: 5efe764 v: v3
1 parent 708031e commit 95a0014

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+272
-247
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 936c07dcf0137b7ef456e82b9e70c3a2743dbe16
2+
refs/heads/master: 72c9aab0d2802785b8a84ea9f88906b19bc7ed29
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2d28d645422c1617be58c8ca7ad9a457264ca850
55
refs/heads/try: c50a9d5b664478e533ba1d1d353213d70c8ad589

trunk/src/libcore/at_vec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pub fn build_sized_opt<A>(size: Option<uint>,
102102
#[inline(always)]
103103
pub fn append<T:Copy>(lhs: @[T], rhs: &const [T]) -> @[T] {
104104
do build_sized(lhs.len() + rhs.len()) |push| {
105-
for lhs.each |x| { push(*x); }
105+
for vec::each(lhs) |x| { push(*x); }
106106
for uint::range(0, rhs.len()) |i| { push(rhs[i]); }
107107
}
108108
}
@@ -111,7 +111,7 @@ pub fn append<T:Copy>(lhs: @[T], rhs: &const [T]) -> @[T] {
111111
/// Apply a function to each element of a vector and return the results
112112
pub fn map<T, U>(v: &[T], f: &fn(x: &T) -> U) -> @[U] {
113113
do build_sized(v.len()) |push| {
114-
for v.each |elem| {
114+
for vec::each(v) |elem| {
115115
push(f(elem));
116116
}
117117
}
@@ -166,7 +166,7 @@ pub fn from_slice<T:Copy>(v: &[T]) -> @[T] {
166166
from_fn(v.len(), |i| v[i])
167167
}
168168

169-
#[cfg(not(test))]
169+
#[cfg(notest)]
170170
pub mod traits {
171171
use at_vec::append;
172172
use kinds::Copy;

trunk/src/libcore/bool.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Boolean logic
1212
13-
#[cfg(not(test))]
13+
#[cfg(notest)]
1414
use cmp::{Eq, Ord, TotalOrd, Ordering};
1515
use option::{None, Option, Some};
1616
use from_str::FromStr;
@@ -75,7 +75,7 @@ pub fn all_values(blk: &fn(v: bool)) {
7575
#[inline(always)]
7676
pub fn to_bit(v: bool) -> u8 { if v { 1u8 } else { 0u8 } }
7777

78-
#[cfg(not(test))]
78+
#[cfg(notest)]
7979
impl Ord for bool {
8080
#[inline(always)]
8181
fn lt(&self, other: &bool) -> bool { to_bit(*self) < to_bit(*other) }
@@ -87,13 +87,13 @@ impl Ord for bool {
8787
fn ge(&self, other: &bool) -> bool { to_bit(*self) >= to_bit(*other) }
8888
}
8989

90-
#[cfg(not(test))]
90+
#[cfg(notest)]
9191
impl TotalOrd for bool {
9292
#[inline(always)]
9393
fn cmp(&self, other: &bool) -> Ordering { to_bit(*self).cmp(&to_bit(*other)) }
9494
}
9595

96-
#[cfg(not(test))]
96+
#[cfg(notest)]
9797
impl Eq for bool {
9898
#[inline(always)]
9999
fn eq(&self, other: &bool) -> bool { (*self) == (*other) }

trunk/src/libcore/char.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010

1111
//! Utilities for manipulating the char type
1212
13-
#[cfg(not(test))]
13+
#[cfg(notest)]
1414
use cmp::Ord;
1515
use option::{None, Option, Some};
1616
use str;
1717
use u32;
1818
use uint;
1919
use unicode::{derived_property, general_category};
2020

21-
#[cfg(not(test))] use cmp::Eq;
21+
#[cfg(notest)] use cmp::Eq;
2222

2323
/*
2424
Lu Uppercase_Letter an uppercase letter
@@ -244,15 +244,15 @@ pub fn len_utf8_bytes(c: char) -> uint {
244244
else { fail!(~"invalid character!") }
245245
}
246246
247-
#[cfg(not(test))]
247+
#[cfg(notest)]
248248
impl Eq for char {
249249
#[inline(always)]
250250
fn eq(&self, other: &char) -> bool { (*self) == (*other) }
251251
#[inline(always)]
252252
fn ne(&self, other: &char) -> bool { (*self) != (*other) }
253253
}
254254
255-
#[cfg(not(test))]
255+
#[cfg(notest)]
256256
impl Ord for char {
257257
#[inline(always)]
258258
fn lt(&self, other: &char) -> bool { *self < *other }

trunk/src/libcore/cleanup.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ use ptr::mut_null;
1515
use repr::BoxRepr;
1616
use sys::TypeDesc;
1717
use cast::transmute;
18-
#[cfg(not(test))] use unstable::lang::clear_task_borrow_list;
18+
#[cfg(notest)] use unstable::lang::clear_task_borrow_list;
1919

20-
#[cfg(not(test))] use ptr::to_unsafe_ptr;
20+
#[cfg(notest)] use ptr::to_unsafe_ptr;
2121

2222
/**
2323
* Runtime structures
@@ -164,7 +164,7 @@ fn debug_mem() -> bool {
164164
}
165165

166166
/// Destroys all managed memory (i.e. @ boxes) held by the current task.
167-
#[cfg(not(test))]
167+
#[cfg(notest)]
168168
#[lang="annihilate"]
169169
pub unsafe fn annihilate() {
170170
use unstable::lang::local_free;

trunk/src/libcore/core.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ pub mod managed;
179179

180180
/* Core language traits */
181181

182-
#[cfg(not(test))] pub mod kinds;
183-
#[cfg(not(test))] pub mod ops;
184-
#[cfg(not(test))] pub mod cmp;
182+
#[cfg(notest)] pub mod kinds;
183+
#[cfg(notest)] pub mod ops;
184+
#[cfg(notest)] pub mod cmp;
185185

186186

187187
/* Common traits */

trunk/src/libcore/either.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn lefts<T:Copy,U>(eithers: &[Either<T, U>]) -> ~[T] {
4444
//! Extracts from a vector of either all the left values
4545
4646
do vec::build_sized(eithers.len()) |push| {
47-
for eithers.each |elt| {
47+
for vec::each(eithers) |elt| {
4848
match *elt {
4949
Left(ref l) => { push(*l); }
5050
_ => { /* fallthrough */ }
@@ -57,7 +57,7 @@ pub fn rights<T, U: Copy>(eithers: &[Either<T, U>]) -> ~[U] {
5757
//! Extracts from a vector of either all the right values
5858
5959
do vec::build_sized(eithers.len()) |push| {
60-
for eithers.each |elt| {
60+
for vec::each(eithers) |elt| {
6161
match *elt {
6262
Right(ref r) => { push(*r); }
6363
_ => { /* fallthrough */ }

trunk/src/libcore/hash.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ use cast;
2424
use rt::io::Writer;
2525
use to_bytes::IterBytes;
2626
use uint;
27+
use vec;
2728

2829
// Alias `SipState` to `State`.
2930
pub use State = hash::SipState;
@@ -377,7 +378,7 @@ impl Streaming for SipState {
377378
fn result_str(&mut self) -> ~str {
378379
let r = self.result_bytes();
379380
let mut s = ~"";
380-
for r.each |b| {
381+
for vec::each(r) |b| {
381382
s += uint::to_str_radix(*b as uint, 16u);
382383
}
383384
s
@@ -477,7 +478,7 @@ mod tests {
477478

478479
fn to_hex_str(r: &[u8, ..8]) -> ~str {
479480
let mut s = ~"";
480-
for (*r).each |b| {
481+
for vec::each(*r) |b| {
481482
s += uint::to_str_radix(*b as uint, 16u);
482483
}
483484
s

trunk/src/libcore/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ pub fn mk_file_writer(path: &Path, flags: &[FileFlag])
12001200
fn wb() -> c_int { O_WRONLY as c_int }
12011201

12021202
let mut fflags: c_int = wb();
1203-
for flags.each |f| {
1203+
for vec::each(flags) |f| {
12041204
match *f {
12051205
Append => fflags |= O_APPEND as c_int,
12061206
Create => fflags |= O_CREAT as c_int,

trunk/src/libcore/logging.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn console_off() {
4242
}
4343
}
4444

45-
#[cfg(not(test))]
45+
#[cfg(notest)]
4646
#[lang="log_type"]
4747
pub fn log_type<T>(level: u32, object: &T) {
4848
use cast::transmute;

trunk/src/libcore/managed.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
use ptr::to_unsafe_ptr;
1414

15-
#[cfg(not(test))] use cmp::{Eq, Ord};
15+
#[cfg(notest)] use cmp::{Eq, Ord};
1616

1717
pub mod raw {
1818
use intrinsic::TyDesc;
@@ -49,23 +49,23 @@ pub fn mut_ptr_eq<T>(a: @mut T, b: @mut T) -> bool {
4949
a_ptr == b_ptr
5050
}
5151

52-
#[cfg(not(test))]
52+
#[cfg(notest)]
5353
impl<T:Eq> Eq for @T {
5454
#[inline(always)]
5555
fn eq(&self, other: &@T) -> bool { *(*self) == *(*other) }
5656
#[inline(always)]
5757
fn ne(&self, other: &@T) -> bool { *(*self) != *(*other) }
5858
}
5959

60-
#[cfg(not(test))]
60+
#[cfg(notest)]
6161
impl<T:Eq> Eq for @mut T {
6262
#[inline(always)]
6363
fn eq(&self, other: &@mut T) -> bool { *(*self) == *(*other) }
6464
#[inline(always)]
6565
fn ne(&self, other: &@mut T) -> bool { *(*self) != *(*other) }
6666
}
6767

68-
#[cfg(not(test))]
68+
#[cfg(notest)]
6969
impl<T:Ord> Ord for @T {
7070
#[inline(always)]
7171
fn lt(&self, other: &@T) -> bool { *(*self) < *(*other) }
@@ -77,7 +77,7 @@ impl<T:Ord> Ord for @T {
7777
fn gt(&self, other: &@T) -> bool { *(*self) > *(*other) }
7878
}
7979

80-
#[cfg(not(test))]
80+
#[cfg(notest)]
8181
impl<T:Ord> Ord for @mut T {
8282
#[inline(always)]
8383
fn lt(&self, other: &@mut T) -> bool { *(*self) < *(*other) }

trunk/src/libcore/nil.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ Functions for the unit type.
1414
1515
*/
1616

17-
#[cfg(not(test))]
17+
#[cfg(notest)]
1818
use prelude::*;
1919

20-
#[cfg(not(test))]
20+
#[cfg(notest)]
2121
impl Eq for () {
2222
#[inline(always)]
2323
fn eq(&self, _other: &()) -> bool { true }
2424
#[inline(always)]
2525
fn ne(&self, _other: &()) -> bool { false }
2626
}
2727

28-
#[cfg(not(test))]
28+
#[cfg(notest)]
2929
impl Ord for () {
3030
#[inline(always)]
3131
fn lt(&self, _other: &()) -> bool { false }
@@ -37,13 +37,13 @@ impl Ord for () {
3737
fn gt(&self, _other: &()) -> bool { false }
3838
}
3939

40-
#[cfg(not(test))]
40+
#[cfg(notest)]
4141
impl TotalOrd for () {
4242
#[inline(always)]
4343
fn cmp(&self, _other: &()) -> Ordering { Equal }
4444
}
4545

46-
#[cfg(not(test))]
46+
#[cfg(notest)]
4747
impl TotalEq for () {
4848
#[inline(always)]
4949
fn equals(&self, _other: &()) -> bool { true }

trunk/src/libcore/num/f32.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,15 @@ pub mod consts {
198198

199199
impl Num for f32 {}
200200

201-
#[cfg(not(test))]
201+
#[cfg(notest)]
202202
impl Eq for f32 {
203203
#[inline(always)]
204204
fn eq(&self, other: &f32) -> bool { (*self) == (*other) }
205205
#[inline(always)]
206206
fn ne(&self, other: &f32) -> bool { (*self) != (*other) }
207207
}
208208

209-
#[cfg(not(test))]
209+
#[cfg(notest)]
210210
impl ApproxEq<f32> for f32 {
211211
#[inline(always)]
212212
fn approx_epsilon() -> f32 { 1.0e-6 }
@@ -222,7 +222,7 @@ impl ApproxEq<f32> for f32 {
222222
}
223223
}
224224

225-
#[cfg(not(test))]
225+
#[cfg(notest)]
226226
impl Ord for f32 {
227227
#[inline(always)]
228228
fn lt(&self, other: &f32) -> bool { (*self) < (*other) }
@@ -272,37 +272,37 @@ impl One for f32 {
272272
fn one() -> f32 { 1.0 }
273273
}
274274

275-
#[cfg(not(test))]
275+
#[cfg(notest)]
276276
impl Add<f32,f32> for f32 {
277277
#[inline(always)]
278278
fn add(&self, other: &f32) -> f32 { *self + *other }
279279
}
280280

281-
#[cfg(not(test))]
281+
#[cfg(notest)]
282282
impl Sub<f32,f32> for f32 {
283283
#[inline(always)]
284284
fn sub(&self, other: &f32) -> f32 { *self - *other }
285285
}
286286

287-
#[cfg(not(test))]
287+
#[cfg(notest)]
288288
impl Mul<f32,f32> for f32 {
289289
#[inline(always)]
290290
fn mul(&self, other: &f32) -> f32 { *self * *other }
291291
}
292292

293-
#[cfg(not(test))]
293+
#[cfg(notest)]
294294
impl Div<f32,f32> for f32 {
295295
#[inline(always)]
296296
fn div(&self, other: &f32) -> f32 { *self / *other }
297297
}
298298

299-
#[cfg(not(test))]
299+
#[cfg(notest)]
300300
impl Rem<f32,f32> for f32 {
301301
#[inline(always)]
302302
fn rem(&self, other: &f32) -> f32 { *self % *other }
303303
}
304304

305-
#[cfg(not(test))]
305+
#[cfg(notest)]
306306
impl Neg<f32> for f32 {
307307
#[inline(always)]
308308
fn neg(&self) -> f32 { -*self }

0 commit comments

Comments
 (0)