diff options
| author | bors <bors@rust-lang.org> | 2013-07-27 22:31:22 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-07-27 22:31:22 -0700 |
| commit | 9325535b41fa5a7cfac697e86ae86bd1384542e6 (patch) | |
| tree | f28193aa80d78d16efd25cf319fbd8b604125173 /src/test | |
| parent | 3078e83c3f1a643ddbdefa78095e4fbda3cecc02 (diff) | |
| parent | 39b3a0561f06b1ea01a12d8fc3372334116a7833 (diff) | |
| download | rust-9325535b41fa5a7cfac697e86ae86bd1384542e6.tar.gz rust-9325535b41fa5a7cfac697e86ae86bd1384542e6.zip | |
auto merge of #7978 : sstewartgallus/rust/rename_arc, r=bblum
To be more specific: `UPPERCASETYPE` was changed to `UppercaseType` `type_new` was changed to `Type::new` `type_function(value)` was changed to `value.method()`
Diffstat (limited to 'src/test')
26 files changed, 39 insertions, 39 deletions
diff --git a/src/test/bench/graph500-bfs.rs b/src/test/bench/graph500-bfs.rs index f17b6658f9d..00add20fb7d 100644 --- a/src/test/bench/graph500-bfs.rs +++ b/src/test/bench/graph500-bfs.rs @@ -230,7 +230,7 @@ fn bfs2(graph: graph, key: node_id) -> bfs_result { } /// A parallel version of the bfs function. -fn pbfs(graph: &arc::ARC<graph>, key: node_id) -> bfs_result { +fn pbfs(graph: &arc::Arc<graph>, key: node_id) -> bfs_result { // This works by doing functional updates of a color vector. let graph_vec = graph.get(); // FIXME #3387 requires this temp @@ -263,7 +263,7 @@ fn pbfs(graph: &arc::ARC<graph>, key: node_id) -> bfs_result { i += 1; let old_len = colors.len(); - let color = arc::ARC(colors); + let color = arc::Arc::new(colors); let color_vec = color.get(); // FIXME #3387 requires this temp colors = do par::mapi(*color_vec) { @@ -444,7 +444,7 @@ fn main() { let mut total_seq = 0.0; let mut total_par = 0.0; - let graph_arc = arc::ARC(graph.clone()); + let graph_arc = arc::Arc::new(graph.clone()); do gen_search_keys(graph, num_keys).map() |root| { io::stdout().write_line(""); diff --git a/src/test/bench/msgsend-ring-mutex-arcs.rs b/src/test/bench/msgsend-ring-mutex-arcs.rs index 0fa641e395e..c685057874a 100644 --- a/src/test/bench/msgsend-ring-mutex-arcs.rs +++ b/src/test/bench/msgsend-ring-mutex-arcs.rs @@ -11,9 +11,9 @@ // This test creates a bunch of tasks that simultaneously send to each // other in a ring. The messages should all be basically // independent. -// This is like msgsend-ring-pipes but adapted to use ARCs. +// This is like msgsend-ring-pipes but adapted to use Arcs. -// This also serves as a pipes test, because ARCs are implemented with pipes. +// This also serves as a pipes test, because Arcs are implemented with pipes. extern mod extra; @@ -26,7 +26,7 @@ use std::os; use std::uint; // A poor man's pipe. -type pipe = arc::MutexARC<~[uint]>; +type pipe = arc::MutexArc<~[uint]>; fn send(p: &pipe, msg: uint) { unsafe { @@ -48,7 +48,7 @@ fn recv(p: &pipe) -> uint { } fn init() -> (pipe,pipe) { - let m = arc::MutexARC(~[]); + let m = arc::MutexArc::new(~[]); ((&m).clone(), m) } diff --git a/src/test/bench/msgsend-ring-rw-arcs.rs b/src/test/bench/msgsend-ring-rw-arcs.rs index 09d1c632d0e..e7def11b266 100644 --- a/src/test/bench/msgsend-ring-rw-arcs.rs +++ b/src/test/bench/msgsend-ring-rw-arcs.rs @@ -11,9 +11,9 @@ // This test creates a bunch of tasks that simultaneously send to each // other in a ring. The messages should all be basically // independent. -// This is like msgsend-ring-pipes but adapted to use ARCs. +// This is like msgsend-ring-pipes but adapted to use Arcs. -// This also serves as a pipes test, because ARCs are implemented with pipes. +// This also serves as a pipes test, because Arcs are implemented with pipes. extern mod extra; @@ -26,7 +26,7 @@ use std::os; use std::uint; // A poor man's pipe. -type pipe = arc::RWARC<~[uint]>; +type pipe = arc::RWArc<~[uint]>; fn send(p: &pipe, msg: uint) { do p.write_cond |state, cond| { @@ -44,7 +44,7 @@ fn recv(p: &pipe) -> uint { } fn init() -> (pipe,pipe) { - let x = arc::RWARC(~[]); + let x = arc::RWArc::new(~[]); ((&x).clone(), x) } diff --git a/src/test/compile-fail/arc-rw-cond-shouldnt-escape.rs b/src/test/compile-fail/arc-rw-cond-shouldnt-escape.rs index b00b701191e..f8a3c5c573a 100644 --- a/src/test/compile-fail/arc-rw-cond-shouldnt-escape.rs +++ b/src/test/compile-fail/arc-rw-cond-shouldnt-escape.rs @@ -12,7 +12,7 @@ extern mod extra; use extra::arc; fn main() { - let x = ~arc::RWARC(1); + let x = ~arc::RWArc::new(1); let mut y = None; do x.write_cond |_one, cond| { y = Some(cond); diff --git a/src/test/compile-fail/arc-rw-read-mode-shouldnt-escape.rs b/src/test/compile-fail/arc-rw-read-mode-shouldnt-escape.rs index 6d4b774fd5f..451616a074f 100644 --- a/src/test/compile-fail/arc-rw-read-mode-shouldnt-escape.rs +++ b/src/test/compile-fail/arc-rw-read-mode-shouldnt-escape.rs @@ -11,7 +11,7 @@ extern mod extra; use extra::arc; fn main() { - let x = ~arc::RWARC(1); + let x = ~arc::RWArc::new(1); let mut y = None; do x.write_downgrade |write_mode| { y = Some(x.downgrade(write_mode)); diff --git a/src/test/compile-fail/arc-rw-state-shouldnt-escape.rs b/src/test/compile-fail/arc-rw-state-shouldnt-escape.rs index 001e6cf922f..44657dfd0ef 100644 --- a/src/test/compile-fail/arc-rw-state-shouldnt-escape.rs +++ b/src/test/compile-fail/arc-rw-state-shouldnt-escape.rs @@ -11,7 +11,7 @@ extern mod extra; use extra::arc; fn main() { - let x = ~arc::RWARC(1); + let x = ~arc::RWArc::new(1); let mut y = None; //~ ERROR lifetime of variable does not enclose its declaration do x.write |one| { y = Some(one); diff --git a/src/test/compile-fail/arc-rw-write-mode-cond-shouldnt-escape.rs b/src/test/compile-fail/arc-rw-write-mode-cond-shouldnt-escape.rs index 59e899dbbf2..44ac0e722d3 100644 --- a/src/test/compile-fail/arc-rw-write-mode-cond-shouldnt-escape.rs +++ b/src/test/compile-fail/arc-rw-write-mode-cond-shouldnt-escape.rs @@ -12,7 +12,7 @@ extern mod extra; use extra::arc; fn main() { - let x = ~arc::RWARC(1); + let x = ~arc::RWArc::new(1); let mut y = None; do x.write_downgrade |write_mode| { do (&write_mode).write_cond |_one, cond| { diff --git a/src/test/compile-fail/arc-rw-write-mode-shouldnt-escape.rs b/src/test/compile-fail/arc-rw-write-mode-shouldnt-escape.rs index 2599fb4dfa0..b6535b6189a 100644 --- a/src/test/compile-fail/arc-rw-write-mode-shouldnt-escape.rs +++ b/src/test/compile-fail/arc-rw-write-mode-shouldnt-escape.rs @@ -12,7 +12,7 @@ extern mod extra; use extra::arc; fn main() { - let x = ~arc::RWARC(1); + let x = ~arc::RWArc::new(1); let mut y = None; do x.write_downgrade |write_mode| { y = Some(write_mode); diff --git a/src/test/compile-fail/no-capture-arc.rs b/src/test/compile-fail/no-capture-arc.rs index b036071fd87..fd54b6638c6 100644 --- a/src/test/compile-fail/no-capture-arc.rs +++ b/src/test/compile-fail/no-capture-arc.rs @@ -17,7 +17,7 @@ use std::task; fn main() { let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; - let arc_v = arc::ARC(v); + let arc_v = arc::Arc::new(v); do task::spawn() { let v = arc_v.get(); diff --git a/src/test/compile-fail/no-reuse-move-arc.rs b/src/test/compile-fail/no-reuse-move-arc.rs index 28f3ea7af9f..a17196ae298 100644 --- a/src/test/compile-fail/no-reuse-move-arc.rs +++ b/src/test/compile-fail/no-reuse-move-arc.rs @@ -15,7 +15,7 @@ use std::task; fn main() { let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; - let arc_v = arc::ARC(v); + let arc_v = arc::Arc::new(v); do task::spawn() { let v = arc_v.get(); diff --git a/src/test/compile-fail/once-cant-call-twice-on-heap.rs b/src/test/compile-fail/once-cant-call-twice-on-heap.rs index 4436675d69a..dddd9a1868c 100644 --- a/src/test/compile-fail/once-cant-call-twice-on-heap.rs +++ b/src/test/compile-fail/once-cant-call-twice-on-heap.rs @@ -21,7 +21,7 @@ fn foo(blk: ~once fn()) { } fn main() { - let x = arc::ARC(true); + let x = arc::Arc::new(true); do foo { assert!(*x.get()); util::ignore(x); diff --git a/src/test/compile-fail/once-cant-call-twice-on-stack.rs b/src/test/compile-fail/once-cant-call-twice-on-stack.rs index 10877be549e..45110bd4bc6 100644 --- a/src/test/compile-fail/once-cant-call-twice-on-stack.rs +++ b/src/test/compile-fail/once-cant-call-twice-on-stack.rs @@ -22,7 +22,7 @@ fn foo(blk: &once fn()) { } fn main() { - let x = arc::ARC(true); + let x = arc::Arc::new(true); do foo { assert!(*x.get()); util::ignore(x); diff --git a/src/test/compile-fail/once-cant-move-out-of-non-once-on-heap.rs b/src/test/compile-fail/once-cant-move-out-of-non-once-on-heap.rs index 61f158cec27..cc40fb6b8d8 100644 --- a/src/test/compile-fail/once-cant-move-out-of-non-once-on-heap.rs +++ b/src/test/compile-fail/once-cant-move-out-of-non-once-on-heap.rs @@ -21,7 +21,7 @@ fn foo(blk: ~fn()) { } fn main() { - let x = arc::ARC(true); + let x = arc::Arc::new(true); do foo { assert!(*x.get()); util::ignore(x); //~ ERROR cannot move out of captured outer variable diff --git a/src/test/compile-fail/once-cant-move-out-of-non-once-on-stack.rs b/src/test/compile-fail/once-cant-move-out-of-non-once-on-stack.rs index 42c8b9a9998..aedeb92df78 100644 --- a/src/test/compile-fail/once-cant-move-out-of-non-once-on-stack.rs +++ b/src/test/compile-fail/once-cant-move-out-of-non-once-on-stack.rs @@ -21,7 +21,7 @@ fn foo(blk: &fn()) { } fn main() { - let x = arc::ARC(true); + let x = arc::Arc::new(true); do foo { assert!(*x.get()); util::ignore(x); //~ ERROR cannot move out of captured outer variable diff --git a/src/test/compile-fail/sync-cond-shouldnt-escape.rs b/src/test/compile-fail/sync-cond-shouldnt-escape.rs index 2006027e797..928953de390 100644 --- a/src/test/compile-fail/sync-cond-shouldnt-escape.rs +++ b/src/test/compile-fail/sync-cond-shouldnt-escape.rs @@ -13,7 +13,7 @@ extern mod extra; use extra::sync; fn main() { - let m = ~sync::Mutex(); + let m = ~sync::Mutex::new(); let mut cond = None; do m.lock_cond |c| { cond = Some(c); diff --git a/src/test/compile-fail/sync-rwlock-cond-shouldnt-escape.rs b/src/test/compile-fail/sync-rwlock-cond-shouldnt-escape.rs index 4108201f911..03779b3ffe3 100644 --- a/src/test/compile-fail/sync-rwlock-cond-shouldnt-escape.rs +++ b/src/test/compile-fail/sync-rwlock-cond-shouldnt-escape.rs @@ -12,7 +12,7 @@ extern mod extra; use extra::sync; fn main() { - let x = ~sync::RWlock(); + let x = ~sync::RWLock::new(); let mut y = None; do x.write_cond |cond| { y = Some(cond); diff --git a/src/test/compile-fail/sync-rwlock-read-mode-shouldnt-escape.rs b/src/test/compile-fail/sync-rwlock-read-mode-shouldnt-escape.rs index 4bec5fa270a..6ce3869bab2 100644 --- a/src/test/compile-fail/sync-rwlock-read-mode-shouldnt-escape.rs +++ b/src/test/compile-fail/sync-rwlock-read-mode-shouldnt-escape.rs @@ -12,7 +12,7 @@ extern mod extra; use extra::sync; fn main() { - let x = ~sync::RWlock(); + let x = ~sync::RWLock::new(); let mut y = None; do x.write_downgrade |write_mode| { y = Some(x.downgrade(write_mode)); diff --git a/src/test/compile-fail/sync-rwlock-write-mode-cond-shouldnt-escape.rs b/src/test/compile-fail/sync-rwlock-write-mode-cond-shouldnt-escape.rs index 43b4d9aabb8..fab16894a65 100644 --- a/src/test/compile-fail/sync-rwlock-write-mode-cond-shouldnt-escape.rs +++ b/src/test/compile-fail/sync-rwlock-write-mode-cond-shouldnt-escape.rs @@ -12,7 +12,7 @@ extern mod extra; use extra::sync; fn main() { - let x = ~sync::RWlock(); + let x = ~sync::RWLock::new(); let mut y = None; do x.write_downgrade |write_mode| { do (&write_mode).write_cond |cond| { diff --git a/src/test/compile-fail/sync-rwlock-write-mode-shouldnt-escape.rs b/src/test/compile-fail/sync-rwlock-write-mode-shouldnt-escape.rs index 15af7be5246..7210fbf37b4 100644 --- a/src/test/compile-fail/sync-rwlock-write-mode-shouldnt-escape.rs +++ b/src/test/compile-fail/sync-rwlock-write-mode-shouldnt-escape.rs @@ -12,7 +12,7 @@ extern mod extra; use extra::sync; fn main() { - let x = ~sync::RWlock(); + let x = ~sync::RWLock::new(); let mut y = None; do x.write_downgrade |write_mode| { y = Some(write_mode); diff --git a/src/test/run-fail/issue-2444.rs b/src/test/run-fail/issue-2444.rs index 0ab1528e4fb..5e7c7cf519b 100644 --- a/src/test/run-fail/issue-2444.rs +++ b/src/test/run-fail/issue-2444.rs @@ -13,7 +13,7 @@ extern mod extra; use extra::arc; -enum e<T> { e(arc::ARC<T>) } +enum e<T> { e(arc::Arc<T>) } fn foo() -> e<int> {fail!();} diff --git a/src/test/run-pass/bind-by-move.rs b/src/test/run-pass/bind-by-move.rs index 5cde389ff75..9d808d19af2 100644 --- a/src/test/run-pass/bind-by-move.rs +++ b/src/test/run-pass/bind-by-move.rs @@ -11,10 +11,10 @@ // xfail-fast extern mod extra; use extra::arc; -fn dispose(_x: arc::ARC<bool>) { unsafe { } } +fn dispose(_x: arc::Arc<bool>) { unsafe { } } pub fn main() { - let p = arc::ARC(true); + let p = arc::Arc::new(true); let x = Some(p); match x { Some(z) => { dispose(z); }, diff --git a/src/test/run-pass/match-ref-binding-in-guard-3256.rs b/src/test/run-pass/match-ref-binding-in-guard-3256.rs index a199a75de56..e1d2f0e1c48 100644 --- a/src/test/run-pass/match-ref-binding-in-guard-3256.rs +++ b/src/test/run-pass/match-ref-binding-in-guard-3256.rs @@ -12,7 +12,7 @@ use std::unstable; pub fn main() { unsafe { - let x = Some(unstable::sync::exclusive(true)); + let x = Some(unstable::sync::Exclusive::new(true)); match x { Some(ref z) if z.with(|b| *b) => { do z.with |b| { assert!(*b); } diff --git a/src/test/run-pass/once-move-out-on-heap.rs b/src/test/run-pass/once-move-out-on-heap.rs index 38b23fd128d..744cd1066cf 100644 --- a/src/test/run-pass/once-move-out-on-heap.rs +++ b/src/test/run-pass/once-move-out-on-heap.rs @@ -21,7 +21,7 @@ fn foo(blk: ~once fn()) { } fn main() { - let x = arc::ARC(true); + let x = arc::Arc::new(true); do foo { assert!(*x.get()); util::ignore(x); diff --git a/src/test/run-pass/once-move-out-on-stack.rs b/src/test/run-pass/once-move-out-on-stack.rs index e881f576673..002503a5566 100644 --- a/src/test/run-pass/once-move-out-on-stack.rs +++ b/src/test/run-pass/once-move-out-on-stack.rs @@ -22,7 +22,7 @@ fn foo(blk: &once fn()) { } fn main() { - let x = arc::ARC(true); + let x = arc::Arc::new(true); do foo { assert!(*x.get()); util::ignore(x); diff --git a/src/test/run-pass/trait-bounds-in-arc.rs b/src/test/run-pass/trait-bounds-in-arc.rs index a3b2ea02db3..0677b63b5aa 100644 --- a/src/test/run-pass/trait-bounds-in-arc.rs +++ b/src/test/run-pass/trait-bounds-in-arc.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// Tests that a heterogeneous list of existential types can be put inside an ARC +// Tests that a heterogeneous list of existential types can be put inside an Arc // and shared between tasks as long as all types fulfill Freeze+Send. // xfail-fast @@ -64,7 +64,7 @@ fn main() { let dogge1 = Dogge { bark_decibels: 100, tricks_known: 42, name: ~"alan_turing" }; let dogge2 = Dogge { bark_decibels: 55, tricks_known: 11, name: ~"albert_einstein" }; let fishe = Goldfyshe { swim_speed: 998, name: ~"alec_guinness" }; - let arc = arc::ARC(~[~catte as ~Pet:Freeze+Send, + let arc = arc::Arc::new(~[~catte as ~Pet:Freeze+Send, ~dogge1 as ~Pet:Freeze+Send, ~fishe as ~Pet:Freeze+Send, ~dogge2 as ~Pet:Freeze+Send]); @@ -82,21 +82,21 @@ fn main() { p3.recv(); } -fn check_legs(arc: arc::ARC<~[~Pet:Freeze+Send]>) { +fn check_legs(arc: arc::Arc<~[~Pet:Freeze+Send]>) { let mut legs = 0; for arc.get().iter().advance |pet| { legs += pet.num_legs(); } assert!(legs == 12); } -fn check_names(arc: arc::ARC<~[~Pet:Freeze+Send]>) { +fn check_names(arc: arc::Arc<~[~Pet:Freeze+Send]>) { for arc.get().iter().advance |pet| { do pet.name |name| { assert!(name[0] == 'a' as u8 && name[1] == 'l' as u8); } } } -fn check_pedigree(arc: arc::ARC<~[~Pet:Freeze+Send]>) { +fn check_pedigree(arc: arc::Arc<~[~Pet:Freeze+Send]>) { for arc.get().iter().advance |pet| { assert!(pet.of_good_pedigree()); } diff --git a/src/test/run-pass/writealias.rs b/src/test/run-pass/writealias.rs index 8f990e07015..2db954d27c1 100644 --- a/src/test/run-pass/writealias.rs +++ b/src/test/run-pass/writealias.rs @@ -17,7 +17,7 @@ fn f(p: &mut Point) { p.z = 13; } pub fn main() { unsafe { - let x = Some(unstable::sync::exclusive(true)); + let x = Some(unstable::sync::Exclusive::new(true)); match x { Some(ref z) if z.with(|b| *b) => { do z.with |b| { assert!(*b); } |
