Skip to content

Commit 012029a

Browse files
committed
---
yaml --- r: 129488 b: refs/heads/snap-stage3 c: 30ab05a h: refs/heads/master v: v3
1 parent f5b8a03 commit 012029a

File tree

10 files changed

+32
-89
lines changed

10 files changed

+32
-89
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 566b470e138e929e8a93d613372db1ba177c494f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 2e5aea65cd2594f19b9043d8df0e6461504cda9b
4+
refs/heads/snap-stage3: 30ab05aeb5ba13dc292e625456ea5edf486dddd9
55
refs/heads/try: 80b45ddbd351f0a4a939c3a3c4e20b4defec4b35
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ then
635635
LLVM_VERSION=$($LLVM_CONFIG --version)
636636

637637
case $LLVM_VERSION in
638-
(3.[2-6]*)
638+
(3.[2-5]*)
639639
msg "found ok version of LLVM: $LLVM_VERSION"
640640
;;
641641
(*)

branches/snap-stage3/src/libarena/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ mod tests {
563563

564564
struct Noncopy {
565565
string: String,
566-
array: Vec<int>,
566+
array: Vec<int> ,
567567
}
568568

569569
#[test]

branches/snap-stage3/src/libcollections/bitv.rs

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2566,9 +2566,7 @@ mod tests {
25662566
let mut r = rng();
25672567
let mut bitv = 0 as uint;
25682568
b.iter(|| {
2569-
for _ in range(0u, 100) {
2570-
bitv |= 1 << ((r.next_u32() as uint) % uint::BITS);
2571-
}
2569+
bitv |= 1 << ((r.next_u32() as uint) % uint::BITS);
25722570
&bitv
25732571
})
25742572
}
@@ -2578,9 +2576,7 @@ mod tests {
25782576
let mut r = rng();
25792577
let mut bitv = Bitv::with_capacity(BENCH_BITS, false);
25802578
b.iter(|| {
2581-
for _ in range(0u, 100) {
2582-
bitv.set((r.next_u32() as uint) % BENCH_BITS, true);
2583-
}
2579+
bitv.set((r.next_u32() as uint) % BENCH_BITS, true);
25842580
&bitv
25852581
})
25862582
}
@@ -2590,9 +2586,7 @@ mod tests {
25902586
let mut r = rng();
25912587
let mut bitv = Bitv::with_capacity(uint::BITS, false);
25922588
b.iter(|| {
2593-
for _ in range(0u, 100) {
2594-
bitv.set((r.next_u32() as uint) % uint::BITS, true);
2595-
}
2589+
bitv.set((r.next_u32() as uint) % uint::BITS, true);
25962590
&bitv
25972591
})
25982592
}
@@ -2602,9 +2596,7 @@ mod tests {
26022596
let mut r = rng();
26032597
let mut bitv = BitvSet::new();
26042598
b.iter(|| {
2605-
for _ in range(0u, 100) {
2606-
bitv.insert((r.next_u32() as uint) % uint::BITS);
2607-
}
2599+
bitv.insert((r.next_u32() as uint) % uint::BITS);
26082600
&bitv
26092601
})
26102602
}
@@ -2614,9 +2606,7 @@ mod tests {
26142606
let mut r = rng();
26152607
let mut bitv = BitvSet::new();
26162608
b.iter(|| {
2617-
for _ in range(0u, 100) {
2618-
bitv.insert((r.next_u32() as uint) % BENCH_BITS);
2619-
}
2609+
bitv.insert((r.next_u32() as uint) % BENCH_BITS);
26202610
&bitv
26212611
})
26222612
}
@@ -2626,33 +2616,29 @@ mod tests {
26262616
let mut b1 = Bitv::with_capacity(BENCH_BITS, false);
26272617
let b2 = Bitv::with_capacity(BENCH_BITS, false);
26282618
b.iter(|| {
2629-
b1.union(&b2)
2619+
b1.union(&b2);
26302620
})
26312621
}
26322622

26332623
#[bench]
2634-
fn bench_bitv_small_iter(b: &mut Bencher) {
2624+
fn bench_btv_small_iter(b: &mut Bencher) {
26352625
let bitv = Bitv::with_capacity(uint::BITS, false);
26362626
b.iter(|| {
2637-
let mut sum = 0;
2638-
for _ in range(0u, 10) {
2639-
for pres in bitv.iter() {
2640-
sum += pres as uint;
2641-
}
2627+
let mut _sum = 0;
2628+
for pres in bitv.iter() {
2629+
_sum += pres as uint;
26422630
}
2643-
sum
26442631
})
26452632
}
26462633

26472634
#[bench]
26482635
fn bench_bitv_big_iter(b: &mut Bencher) {
26492636
let bitv = Bitv::with_capacity(BENCH_BITS, false);
26502637
b.iter(|| {
2651-
let mut sum = 0;
2638+
let mut _sum = 0;
26522639
for pres in bitv.iter() {
2653-
sum += pres as uint;
2640+
_sum += pres as uint;
26542641
}
2655-
sum
26562642
})
26572643
}
26582644

@@ -2661,11 +2647,10 @@ mod tests {
26612647
let bitv = BitvSet::from_bitv(from_fn(BENCH_BITS,
26622648
|idx| {idx % 3 == 0}));
26632649
b.iter(|| {
2664-
let mut sum = 0;
2650+
let mut _sum = 0;
26652651
for idx in bitv.iter() {
2666-
sum += idx;
2652+
_sum += idx;
26672653
}
2668-
sum
26692654
})
26702655
}
26712656
}

branches/snap-stage3/src/libcollections/priority_queue.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,10 @@ impl<'a, T> Iterator<&'a T> for Items<'a, T> {
529529
}
530530

531531
impl<T: Ord> FromIterator<T> for PriorityQueue<T> {
532-
fn from_iter<Iter: Iterator<T>>(mut iter: Iter) -> PriorityQueue<T> {
533-
let vec: Vec<T> = iter.collect();
534-
PriorityQueue::from_vec(vec)
532+
fn from_iter<Iter: Iterator<T>>(iter: Iter) -> PriorityQueue<T> {
533+
let mut q = PriorityQueue::new();
534+
q.extend(iter);
535+
q
535536
}
536537
}
537538

branches/snap-stage3/src/librustc/middle/borrowck/gather_loans/restrictions.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,19 @@ impl<'a> RestrictionsContext<'a> {
7070
mc::cat_arg(local_id) => {
7171
// R-Variable, locally declared
7272
let lp = Rc::new(LpVar(local_id));
73-
SafeIf(lp.clone(), vec!(lp))
73+
SafeIf(lp.clone(), vec![lp])
7474
}
7575

7676
mc::cat_upvar(upvar_id, _) => {
7777
// R-Variable, captured into closure
7878
let lp = Rc::new(LpUpvar(upvar_id));
79-
SafeIf(lp.clone(), vec!(lp))
79+
SafeIf(lp.clone(), vec![lp])
8080
}
8181

82-
mc::cat_copied_upvar(..) => {
83-
// FIXME(#2152) allow mutation of upvars
84-
Safe
82+
mc::cat_copied_upvar(mc::CopiedUpvar { upvar_id, .. }) => {
83+
// R-Variable, copied/moved into closure
84+
let lp = Rc::new(LpVar(upvar_id));
85+
SafeIf(lp.clone(), vec![lp])
8586
}
8687

8788
mc::cat_downcast(cmt_base) => {

branches/snap-stage3/src/librustrt/unwind.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,8 @@ pub mod eabi {
402402
use libunwind as uw;
403403
use libc::{c_void, c_int};
404404

405-
#[repr(C)]
406405
struct EXCEPTION_RECORD;
407-
#[repr(C)]
408406
struct CONTEXT;
409-
#[repr(C)]
410407
struct DISPATCHER_CONTEXT;
411408

412409
#[repr(C)]

branches/snap-stage3/src/libsyntax/parse/mod.rs

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -412,21 +412,14 @@ pub fn str_lit(lit: &str) -> String {
412412
loop {
413413
match chars.next() {
414414
Some((i, c)) => {
415+
let em = error(i);
415416
match c {
416417
'\\' => {
417-
let ch = chars.peek().unwrap_or_else(|| {
418-
fail!("{}", error(i).as_slice())
419-
}).val1();
420-
421-
if ch == '\n' {
418+
if chars.peek().expect(em.as_slice()).val1() == '\n' {
422419
eat(&mut chars);
423-
} else if ch == '\r' {
420+
} else if chars.peek().expect(em.as_slice()).val1() == '\r' {
424421
chars.next();
425-
let ch = chars.peek().unwrap_or_else(|| {
426-
fail!("{}", error(i).as_slice())
427-
}).val1();
428-
429-
if ch != '\n' {
422+
if chars.peek().expect(em.as_slice()).val1() != '\n' {
430423
fail!("lexer accepted bare CR");
431424
}
432425
eat(&mut chars);
@@ -440,11 +433,7 @@ pub fn str_lit(lit: &str) -> String {
440433
}
441434
},
442435
'\r' => {
443-
let ch = chars.peek().unwrap_or_else(|| {
444-
fail!("{}", error(i).as_slice())
445-
}).val1();
446-
447-
if ch != '\n' {
436+
if chars.peek().expect(em.as_slice()).val1() != '\n' {
448437
fail!("lexer accepted bare CR");
449438
}
450439
chars.next();

branches/snap-stage3/src/test/run-pass/slowparse-bstring.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

branches/snap-stage3/src/test/run-pass/slowparse-string.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)