Skip to content

Commit 445c2e7

Browse files
committed
---
yaml --- r: 148716 b: refs/heads/try2 c: 0a0f87b h: refs/heads/master v: v3
1 parent 0ae9292 commit 445c2e7

File tree

124 files changed

+1144
-512
lines changed

Some content is hidden

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

124 files changed

+1144
-512
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 5281d874ef65899891f57e8d1deed9f8add5bdb2
8+
refs/heads/try2: 0a0f87b7b83bb6b96a465c21ca6280cb48c851df
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/configure

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,10 @@ do
916916
LLVM_OPTS="$LLVM_OPTS --disable-terminfo"
917917
# Try to have LLVM pull in as few dependencies as possible (#9397)
918918
LLVM_OPTS="$LLVM_OPTS --disable-zlib --disable-libffi"
919+
# LLVM says it needs a "new" clang/gcc, but we seem to get by ok with
920+
# older versions on the bots. Get by for a little longer by asking it to
921+
# not do version detection
922+
LLVM_OPTS="$LLVM_OPTS --disable-compiler-version-checks"
919923

920924
# Use win32 native thread/lock apis instead of pthread wrapper.
921925
# (llvm's configure tries to find pthread first, so we have to disable it explicitly.)

branches/try2/src/etc/vim/syntax/rust.vim

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ syn keyword rustTrait FromStr
7878
syn keyword rustTrait FromIterator Extendable
7979
syn keyword rustTrait Iterator DoubleEndedIterator RandomAccessIterator CloneableIterator
8080
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator ExactSize
81-
syn keyword rustTrait Times
8281

8382
syn keyword rustTrait Algebraic Trigonometric Exponential Hyperbolic
8483
syn keyword rustTrait Bitwise Bounded Integer Fractional Real RealExt
@@ -92,16 +91,16 @@ syn keyword rustTrait SendStr SendStrOwned SendStrStatic IntoSendStr
9291
syn keyword rustTrait Str StrVector StrSlice OwnedStr
9392
syn keyword rustTrait IterBytes
9493
syn keyword rustTrait ToStr IntoStr
95-
syn keyword rustTrait CopyableTuple ImmutableTuple
94+
syn keyword rustTrait CloneableTuple ImmutableTuple
9695
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
9796
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
9897
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12
9998
syn keyword rustTrait ImmutableTuple1 ImmutableTuple2 ImmutableTuple3 ImmutableTuple4
10099
syn keyword rustTrait ImmutableTuple5 ImmutableTuple6 ImmutableTuple7 ImmutableTuple8
101100
syn keyword rustTrait ImmutableTuple9 ImmutableTuple10 ImmutableTuple11 ImmutableTuple12
102-
syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector ImmutableCopyableVector
103-
syn keyword rustTrait OwnedVector OwnedCopyableVector OwnedEqVector MutableVector
104-
syn keyword rustTrait Vector VectorVector CopyableVector ImmutableVector
101+
syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector ImmutableCloneableVector
102+
syn keyword rustTrait OwnedVector OwnedCloneableVector OwnedEqVector MutableVector
103+
syn keyword rustTrait Vector VectorVector CloneableVector ImmutableVector
105104

106105
"syn keyword rustFunction stream
107106
syn keyword rustTrait Port Chan GenericChan GenericSmartChan GenericPort Peekable

branches/try2/src/libextra/arc.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -47,7 +47,6 @@ use sync::{Mutex, RWLock};
4747
use std::cast;
4848
use std::sync::arc::UnsafeArc;
4949
use std::task;
50-
use std::borrow;
5150

5251
/// As sync::condvar, a mechanism for unlock-and-descheduling and signaling.
5352
pub struct Condvar<'a> {
@@ -465,7 +464,7 @@ impl<T:Freeze + Send> RWArc<T> {
465464
// of this cast is removing the mutability.)
466465
let new_data = data;
467466
// Downgrade ensured the token belonged to us. Just a sanity check.
468-
assert!(borrow::ref_eq(&(*state).data, new_data));
467+
assert!((&(*state).data as *T as uint) == (new_data as *mut T as uint));
469468
// Produce new token
470469
RWReadMode {
471470
data: new_data,
@@ -770,19 +769,19 @@ mod tests {
770769

771770
task::spawn(proc() {
772771
arc2.write(|num| {
773-
10.times(|| {
772+
for _ in range(0, 10) {
774773
let tmp = *num;
775774
*num = -1;
776775
task::deschedule();
777776
*num = tmp + 1;
778-
});
777+
}
779778
c.send(());
780779
})
781780
});
782781

783782
// Readers try to catch the writer in the act
784783
let mut children = ~[];
785-
5.times(|| {
784+
for _ in range(0, 5) {
786785
let arc3 = arc.clone();
787786
let mut builder = task::task();
788787
children.push(builder.future_result());
@@ -791,7 +790,7 @@ mod tests {
791790
assert!(*num >= 0);
792791
})
793792
});
794-
});
793+
}
795794

796795
// Wait for children to pass their asserts
797796
for r in children.mut_iter() {
@@ -836,7 +835,7 @@ mod tests {
836835

837836
// Reader tasks
838837
let mut reader_convos = ~[];
839-
10.times(|| {
838+
for _ in range(0, 10) {
840839
let ((rp1, rc1), (rp2, rc2)) = (Chan::new(), Chan::new());
841840
reader_convos.push((rc1, rp2));
842841
let arcn = arc.clone();
@@ -847,7 +846,7 @@ mod tests {
847846
rc2.send(());
848847
})
849848
});
850-
});
849+
}
851850

852851
// Writer task
853852
let arc2 = arc.clone();
@@ -944,7 +943,7 @@ mod tests {
944943
read_mode.read(|state| {
945944
// if writer mistakenly got in, make sure it mutates state
946945
// before we assert on it
947-
5.times(|| task::deschedule());
946+
for _ in range(0, 5) { task::deschedule(); }
948947
// make sure writer didn't get in.
949948
assert!(*state);
950949
})
@@ -956,6 +955,6 @@ mod tests {
956955
// helped to expose the race nearly 100% of the time... but adding
957956
// deschedules in the intuitively-right locations made it even less likely,
958957
// and I wasn't sure why :( . This is a mediocre "next best" option.
959-
8.times(|| test_rw_write_cond_downgrade_read_race_helper());
958+
for _ in range(0, 8) { test_rw_write_cond_downgrade_read_race_helper(); }
960959
}
961960
}

branches/try2/src/libextra/base64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,11 @@ mod test {
336336
use std::rand::{task_rng, random, Rng};
337337
use std::vec;
338338

339-
1000.times(|| {
339+
for _ in range(0, 1000) {
340340
let times = task_rng().gen_range(1u, 100);
341341
let v = vec::from_fn(times, |_| random::<u8>());
342342
assert_eq!(v.to_base64(STANDARD).from_base64().unwrap(), v);
343-
})
343+
}
344344
}
345345

346346
#[bench]

branches/try2/src/libextra/comm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ mod test {
127127
// Rendezvous streams should be able to handle any number of messages being sent
128128
let (port, chan) = rendezvous();
129129
spawn(proc() {
130-
10000.times(|| { chan.send(()) })
130+
for _ in range(0, 10000) { chan.send(()); }
131131
});
132-
10000.times(|| { port.recv() })
132+
for _ in range(0, 10000) { port.recv(); }
133133
}
134134

135135
#[test]

branches/try2/src/libextra/dlist.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,11 +1036,11 @@ mod tests {
10361036

10371037
#[test]
10381038
fn test_fuzz() {
1039-
25.times(|| {
1039+
for _ in range(0, 25) {
10401040
fuzz_test(3);
10411041
fuzz_test(16);
10421042
fuzz_test(189);
1043-
})
1043+
}
10441044
}
10451045

10461046
#[cfg(test)]

branches/try2/src/libextra/getopts.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -726,9 +726,9 @@ pub mod groups {
726726
// here we just need to indent the start of the description
727727
let rowlen = row.char_len();
728728
if rowlen < 24 {
729-
(24 - rowlen).times(|| {
730-
row.push_char(' ')
731-
})
729+
for _ in range(0, 24 - rowlen) {
730+
row.push_char(' ');
731+
}
732732
} else {
733733
row.push_str(desc_sep)
734734
}

branches/try2/src/libextra/json.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ fn escape_str(s: &str) -> ~str {
282282

283283
fn spaces(n: uint) -> ~str {
284284
let mut ss = ~"";
285-
n.times(|| ss.push_str(" "));
285+
for _ in range(0, n) { ss.push_str(" "); }
286286
return ss;
287287
}
288288

branches/try2/src/libextra/num/bigint.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2052,22 +2052,22 @@ mod biguint_tests {
20522052
fn test_rand_range() {
20532053
let mut rng = task_rng();
20542054

2055-
10.times(|| {
2055+
for _ in range(0, 10) {
20562056
assert_eq!(rng.gen_bigint_range(&FromPrimitive::from_uint(236).unwrap(),
20572057
&FromPrimitive::from_uint(237).unwrap()),
20582058
FromPrimitive::from_uint(236).unwrap());
2059-
});
2059+
}
20602060

20612061
let l = FromPrimitive::from_uint(403469000 + 2352).unwrap();
20622062
let u = FromPrimitive::from_uint(403469000 + 3513).unwrap();
2063-
1000.times(|| {
2063+
for _ in range(0, 1000) {
20642064
let n: BigUint = rng.gen_biguint_below(&u);
20652065
assert!(n < u);
20662066

20672067
let n: BigUint = rng.gen_biguint_range(&l, &u);
20682068
assert!(n >= l);
20692069
assert!(n < u);
2070-
})
2070+
}
20712071
}
20722072

20732073
#[test]
@@ -2550,19 +2550,19 @@ mod bigint_tests {
25502550
fn test_rand_range() {
25512551
let mut rng = task_rng();
25522552

2553-
10.times(|| {
2553+
for _ in range(0, 10) {
25542554
assert_eq!(rng.gen_bigint_range(&FromPrimitive::from_uint(236).unwrap(),
25552555
&FromPrimitive::from_uint(237).unwrap()),
25562556
FromPrimitive::from_uint(236).unwrap());
2557-
});
2557+
}
25582558

25592559
fn check(l: BigInt, u: BigInt) {
25602560
let mut rng = task_rng();
2561-
1000.times(|| {
2561+
for _ in range(0, 1000) {
25622562
let n: BigInt = rng.gen_bigint_range(&l, &u);
25632563
assert!(n >= l);
25642564
assert!(n < u);
2565-
});
2565+
}
25662566
}
25672567
let l: BigInt = FromPrimitive::from_uint(403469000 + 2352).unwrap();
25682568
let u: BigInt = FromPrimitive::from_uint(403469000 + 3513).unwrap();

branches/try2/src/libextra/ringbuf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,9 +571,9 @@ mod tests {
571571
fn bench_grow(b: &mut test::BenchHarness) {
572572
let mut deq = RingBuf::new();
573573
b.iter(|| {
574-
65.times(|| {
574+
for _ in range(0, 65) {
575575
deq.push_front(1);
576-
})
576+
}
577577
})
578578
}
579579

0 commit comments

Comments
 (0)