Skip to content

Commit 3519171

Browse files
committed
---
yaml --- r: 154683 b: refs/heads/try2 c: bd159d3 h: refs/heads/master i: 154681: 9e4c644 154679: 698ef99 v: v3
1 parent 4deed5b commit 3519171

Some content is hidden

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

64 files changed

+935
-604
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: 6e27c2fd58e290a05653560199762268d50165ff
8+
refs/heads/try2: bd159d3867473ee43959706519066531d76af7ba
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ DEPS_test := std getopts serialize rbml term time regex native:rust_test_helpers
9696
DEPS_time := std serialize
9797
DEPS_rand := core
9898
DEPS_url := std
99-
DEPS_log := std
99+
DEPS_log := std regex
100100
DEPS_regex := std
101101
DEPS_regex_macros = rustc syntax std regex
102102
DEPS_fmt_macros = std

branches/try2/src/compiletest/procsrv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub fn run(lib_path: &str,
4747
match cmd.spawn() {
4848
Ok(mut process) => {
4949
for input in input.iter() {
50-
process.stdin.get_mut_ref().write(input.as_bytes()).unwrap();
50+
process.stdin.as_mut().unwrap().write(input.as_bytes()).unwrap();
5151
}
5252
let ProcessOutput { status, output, error } =
5353
process.wait_with_output().unwrap();
@@ -79,7 +79,7 @@ pub fn run_background(lib_path: &str,
7979
match cmd.spawn() {
8080
Ok(mut process) => {
8181
for input in input.iter() {
82-
process.stdin.get_mut_ref().write(input.as_bytes()).unwrap();
82+
process.stdin.as_mut().unwrap().write(input.as_bytes()).unwrap();
8383
}
8484

8585
Some(process)

branches/try2/src/compiletest/runtest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,7 @@ fn compile_cc_with_clang_and_save_bitcode(config: &Config, _props: &TestProps,
15261526
let testcc = testfile.with_extension("cc");
15271527
let proc_args = ProcArgs {
15281528
// FIXME (#9639): This needs to handle non-utf8 paths
1529-
prog: config.clang_path.get_ref().as_str().unwrap().to_string(),
1529+
prog: config.clang_path.as_ref().unwrap().as_str().unwrap().to_string(),
15301530
args: vec!("-c".to_string(),
15311531
"-emit-llvm".to_string(),
15321532
"-o".to_string(),
@@ -1542,7 +1542,7 @@ fn extract_function_from_bitcode(config: &Config, _props: &TestProps,
15421542
let bitcodefile = output_base_name(config, testfile).with_extension("bc");
15431543
let bitcodefile = append_suffix_to_stem(&bitcodefile, suffix);
15441544
let extracted_bc = append_suffix_to_stem(&bitcodefile, "extract");
1545-
let prog = config.llvm_bin_path.get_ref().join("llvm-extract");
1545+
let prog = config.llvm_bin_path.as_ref().unwrap().join("llvm-extract");
15461546
let proc_args = ProcArgs {
15471547
// FIXME (#9639): This needs to handle non-utf8 paths
15481548
prog: prog.as_str().unwrap().to_string(),
@@ -1559,7 +1559,7 @@ fn disassemble_extract(config: &Config, _props: &TestProps,
15591559
let bitcodefile = append_suffix_to_stem(&bitcodefile, suffix);
15601560
let extracted_bc = append_suffix_to_stem(&bitcodefile, "extract");
15611561
let extracted_ll = extracted_bc.with_extension("ll");
1562-
let prog = config.llvm_bin_path.get_ref().join("llvm-dis");
1562+
let prog = config.llvm_bin_path.as_ref().unwrap().join("llvm-dis");
15631563
let proc_args = ProcArgs {
15641564
// FIXME (#9639): This needs to handle non-utf8 paths
15651565
prog: prog.as_str().unwrap().to_string(),

branches/try2/src/libarena/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ impl<T> TypedArena<T> {
476476
/// Grows the arena.
477477
#[inline(never)]
478478
fn grow(&self) {
479-
let chunk = self.first.borrow_mut().take_unwrap();
479+
let chunk = self.first.borrow_mut().take().unwrap();
480480
let new_capacity = chunk.capacity.checked_mul(&2).unwrap();
481481
let chunk = TypedArenaChunk::<T>::new(Some(chunk), new_capacity);
482482
self.ptr.set(chunk.start() as *const T);
@@ -489,13 +489,13 @@ impl<T> TypedArena<T> {
489489
impl<T> Drop for TypedArena<T> {
490490
fn drop(&mut self) {
491491
// Determine how much was filled.
492-
let start = self.first.borrow().get_ref().start() as uint;
492+
let start = self.first.borrow().as_ref().unwrap().start() as uint;
493493
let end = self.ptr.get() as uint;
494494
let diff = (end - start) / mem::size_of::<T>();
495495

496496
// Pass that to the `destroy` method.
497497
unsafe {
498-
self.first.borrow_mut().get_mut_ref().destroy(diff)
498+
self.first.borrow_mut().as_mut().unwrap().destroy(diff)
499499
}
500500
}
501501
}

branches/try2/src/libcollections/dlist.rs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ impl<'a, A> MutItems<'a, A> {
649649
None => return self.list.push_front_node(ins_node),
650650
Some(prev) => prev,
651651
};
652-
let node_own = prev_node.next.take_unwrap();
652+
let node_own = prev_node.next.take().unwrap();
653653
ins_node.next = link_with_prev(node_own, Rawlink::some(&mut *ins_node));
654654
prev_node.next = link_with_prev(ins_node, Rawlink::some(prev_node));
655655
self.list.length += 1;
@@ -805,21 +805,21 @@ mod tests {
805805
fn test_basic() {
806806
let mut m: DList<Box<int>> = DList::new();
807807
assert_eq!(m.pop_front(), None);
808-
assert_eq!(m.pop_back(), None);
808+
assert_eq!(m.pop(), None);
809809
assert_eq!(m.pop_front(), None);
810810
m.push_front(box 1);
811811
assert_eq!(m.pop_front(), Some(box 1));
812-
m.push_back(box 2);
813-
m.push_back(box 3);
812+
m.push(box 2);
813+
m.push(box 3);
814814
assert_eq!(m.len(), 2);
815815
assert_eq!(m.pop_front(), Some(box 2));
816816
assert_eq!(m.pop_front(), Some(box 3));
817817
assert_eq!(m.len(), 0);
818818
assert_eq!(m.pop_front(), None);
819-
m.push_back(box 1);
820-
m.push_back(box 3);
821-
m.push_back(box 5);
822-
m.push_back(box 7);
819+
m.push(box 1);
820+
m.push(box 3);
821+
m.push(box 5);
822+
m.push(box 7);
823823
assert_eq!(m.pop_front(), Some(box 1));
824824

825825
let mut n = DList::new();
@@ -856,19 +856,19 @@ mod tests {
856856
{
857857
let mut m = DList::new();
858858
let mut n = DList::new();
859-
n.push_back(2i);
859+
n.push(2i);
860860
m.append(n);
861861
assert_eq!(m.len(), 1);
862-
assert_eq!(m.pop_back(), Some(2));
862+
assert_eq!(m.pop(), Some(2));
863863
check_links(&m);
864864
}
865865
{
866866
let mut m = DList::new();
867867
let n = DList::new();
868-
m.push_back(2i);
868+
m.push(2i);
869869
m.append(n);
870870
assert_eq!(m.len(), 1);
871-
assert_eq!(m.pop_back(), Some(2));
871+
assert_eq!(m.pop(), Some(2));
872872
check_links(&m);
873873
}
874874

@@ -889,10 +889,10 @@ mod tests {
889889
{
890890
let mut m = DList::new();
891891
let mut n = DList::new();
892-
n.push_back(2i);
892+
n.push(2i);
893893
m.prepend(n);
894894
assert_eq!(m.len(), 1);
895-
assert_eq!(m.pop_back(), Some(2));
895+
assert_eq!(m.pop(), Some(2));
896896
check_links(&m);
897897
}
898898

@@ -950,9 +950,9 @@ mod tests {
950950
#[test]
951951
fn test_iterator_clone() {
952952
let mut n = DList::new();
953-
n.push_back(2i);
954-
n.push_back(3);
955-
n.push_back(4);
953+
n.push(2i);
954+
n.push(3);
955+
n.push(4);
956956
let mut it = n.iter();
957957
it.next();
958958
let mut jt = it.clone();
@@ -1007,7 +1007,7 @@ mod tests {
10071007
let mut n = DList::new();
10081008
assert!(n.mut_iter().next().is_none());
10091009
n.push_front(4i);
1010-
n.push_back(5);
1010+
n.push(5);
10111011
let mut it = n.mut_iter();
10121012
assert_eq!(it.size_hint(), (2, Some(2)));
10131013
assert!(it.next().is_some());
@@ -1081,8 +1081,8 @@ mod tests {
10811081
assert_eq!(n.pop_front(), Some(1));
10821082

10831083
let mut m = DList::new();
1084-
m.push_back(2i);
1085-
m.push_back(4);
1084+
m.push(2i);
1085+
m.push(4);
10861086
m.insert_ordered(3);
10871087
check_links(&m);
10881088
assert_eq!(vec![2,3,4], m.move_iter().collect::<Vec<int>>());
@@ -1119,7 +1119,7 @@ mod tests {
11191119
assert!(n == m);
11201120
n.push_front(1);
11211121
assert!(n != m);
1122-
m.push_back(1);
1122+
m.push(1);
11231123
assert!(n == m);
11241124

11251125
let n = list_from([2i,3,4]);
@@ -1134,9 +1134,9 @@ mod tests {
11341134

11351135
assert!(hash::hash(&x) == hash::hash(&y));
11361136

1137-
x.push_back(1i);
1138-
x.push_back(2);
1139-
x.push_back(3);
1137+
x.push(1i);
1138+
x.push(2);
1139+
x.push(3);
11401140

11411141
y.push_front(3i);
11421142
y.push_front(2);
@@ -1216,19 +1216,19 @@ mod tests {
12161216
let r: u8 = rand::random();
12171217
match r % 6 {
12181218
0 => {
1219-
m.pop_back();
1219+
m.pop();
12201220
v.pop();
12211221
}
12221222
1 => {
12231223
m.pop_front();
1224-
v.shift();
1224+
v.remove(0);
12251225
}
12261226
2 | 4 => {
12271227
m.push_front(-i);
1228-
v.unshift(-i);
1228+
v.insert(0, -i);
12291229
}
12301230
3 | 5 | _ => {
1231-
m.push_back(i);
1231+
m.push(i);
12321232
v.push(i);
12331233
}
12341234
}
@@ -1264,16 +1264,16 @@ mod tests {
12641264
fn bench_push_back(b: &mut test::Bencher) {
12651265
let mut m: DList<int> = DList::new();
12661266
b.iter(|| {
1267-
m.push_back(0);
1267+
m.push(0);
12681268
})
12691269
}
12701270

12711271
#[bench]
12721272
fn bench_push_back_pop_back(b: &mut test::Bencher) {
12731273
let mut m: DList<int> = DList::new();
12741274
b.iter(|| {
1275-
m.push_back(0);
1276-
m.pop_back();
1275+
m.push(0);
1276+
m.pop();
12771277
})
12781278
}
12791279

branches/try2/src/libcollections/hash/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ impl<S: Writer, T: Hash<S>, U: Hash<S>> Hash<S> for Result<T, U> {
293293

294294
#[cfg(test)]
295295
mod tests {
296-
use std::prelude::*;
297296
use std::mem;
298297

299298
use slice::ImmutableSlice;

0 commit comments

Comments
 (0)