From aab4d6b8d73f029d178c3ac055152f57c7233995 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 29 Aug 2012 14:45:25 -0700 Subject: [PATCH] std: Camel case some constructors --- src/libstd/arc.rs | 42 ++++++------- src/libstd/c_vec.rs | 4 +- src/libstd/ebml.rs | 5 +- src/libstd/sync.rs | 62 +++++++++---------- src/rustc/metadata/csearch.rs | 2 +- src/rustc/metadata/decoder.rs | 20 +++--- src/rustc/middle/astencode.rs | 2 +- src/test/bench/graph500-bfs.rs | 4 +- src/test/bench/msgsend-ring-mutex-arcs.rs | 2 +- src/test/bench/msgsend-ring-rw-arcs.rs | 2 +- .../arc-rw-cond-shouldnt-escape.rs | 2 +- .../arc-rw-read-mode-shouldnt-escape.rs | 2 +- .../arc-rw-state-shouldnt-escape.rs | 2 +- .../arc-rw-write-mode-cond-shouldnt-escape.rs | 2 +- .../arc-rw-write-mode-shouldnt-escape.rs | 2 +- src/test/compile-fail/no-capture-arc.rs | 2 +- src/test/compile-fail/no-reuse-move-arc.rs | 2 +- .../compile-fail/sync-cond-shouldnt-escape.rs | 2 +- .../sync-rwlock-cond-shouldnt-escape.rs | 2 +- .../sync-rwlock-read-mode-shouldnt-escape.rs | 2 +- ...-rwlock-write-mode-cond-shouldnt-escape.rs | 2 +- .../sync-rwlock-write-mode-shouldnt-escape.rs | 2 +- src/test/run-pass/auto_serialize.rs | 2 +- 23 files changed, 85 insertions(+), 86 deletions(-) diff --git a/src/libstd/arc.rs b/src/libstd/arc.rs index 70e33576365..89cdb2a674d 100644 --- a/src/libstd/arc.rs +++ b/src/libstd/arc.rs @@ -10,13 +10,13 @@ import unsafe::{SharedMutableState, shared_mutable_state, clone_shared_mutable_state, unwrap_shared_mutable_state, get_shared_mutable_state, get_shared_immutable_state}; import sync; -import sync::{Mutex, mutex, mutex_with_condvars, - RWlock, rwlock, rwlock_with_condvars}; +import sync::{Mutex, mutex_with_condvars, + RWlock, rwlock_with_condvars}; -export ARC, arc, clone, get; +export ARC, clone, get; export Condvar; -export MutexARC, mutex_arc, mutex_arc_with_condvars, unwrap_mutex_arc; -export RWARC, rw_arc, rw_arc_with_condvars, RWWriteMode, RWReadMode; +export MutexARC, mutex_arc_with_condvars, unwrap_mutex_arc; +export RWARC, rw_arc_with_condvars, RWWriteMode, RWReadMode; export unwrap_rw_arc; /// As sync::condvar, a mechanism for unlock-and-descheduling and signalling. @@ -73,7 +73,7 @@ impl &Condvar { struct ARC { x: SharedMutableState; } /// Create an atomically reference counted wrapper. -fn arc(+data: T) -> ARC { +fn ARC(+data: T) -> ARC { ARC { x: unsafe { shared_mutable_state(data) } } } @@ -120,7 +120,7 @@ struct MutexARCInner { lock: Mutex; failed: bool; data: T; } struct MutexARC { x: SharedMutableState>; } /// Create a mutex-protected ARC with the supplied data. -fn mutex_arc(+user_data: T) -> MutexARC { +fn MutexARC(+user_data: T) -> MutexARC { mutex_arc_with_condvars(user_data, 1) } /** @@ -249,7 +249,7 @@ struct RWARC { } /// Create a reader/writer ARC with the supplied data. -fn rw_arc(+user_data: T) -> RWARC { +fn RWARC(+user_data: T) -> RWARC { rw_arc_with_condvars(user_data, 1) } /** @@ -445,7 +445,7 @@ mod tests { #[test] fn manually_share_arc() { let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; - let arc_v = arc::arc(v); + let arc_v = arc::ARC(v); let (c, p) = pipes::stream(); @@ -469,7 +469,7 @@ mod tests { #[test] fn test_mutex_arc_condvar() { - let arc = ~mutex_arc(false); + let arc = ~MutexARC(false); let arc2 = ~arc.clone(); let (c,p) = pipes::oneshot(); let (c,p) = (~mut Some(c), ~mut Some(p)); @@ -491,7 +491,7 @@ mod tests { } #[test] #[should_fail] #[ignore(cfg(windows))] fn test_arc_condvar_poison() { - let arc = ~mutex_arc(1); + let arc = ~MutexARC(1); let arc2 = ~arc.clone(); let (c,p) = pipes::stream(); @@ -512,7 +512,7 @@ mod tests { } #[test] #[should_fail] #[ignore(cfg(windows))] fn test_mutex_arc_poison() { - let arc = ~mutex_arc(1); + let arc = ~MutexARC(1); let arc2 = ~arc.clone(); do task::try { do arc2.access |one| { @@ -525,7 +525,7 @@ mod tests { } #[test] #[should_fail] #[ignore(cfg(windows))] fn test_mutex_arc_unwrap_poison() { - let arc = mutex_arc(1); + let arc = MutexARC(1); let arc2 = ~(&arc).clone(); let (c,p) = pipes::stream(); do task::spawn { @@ -540,7 +540,7 @@ mod tests { } #[test] #[should_fail] #[ignore(cfg(windows))] fn test_rw_arc_poison_wr() { - let arc = ~rw_arc(1); + let arc = ~RWARC(1); let arc2 = ~arc.clone(); do task::try { do arc2.write |one| { @@ -553,7 +553,7 @@ mod tests { } #[test] #[should_fail] #[ignore(cfg(windows))] fn test_rw_arc_poison_ww() { - let arc = ~rw_arc(1); + let arc = ~RWARC(1); let arc2 = ~arc.clone(); do task::try { do arc2.write |one| { @@ -566,7 +566,7 @@ mod tests { } #[test] #[should_fail] #[ignore(cfg(windows))] fn test_rw_arc_poison_dw() { - let arc = ~rw_arc(1); + let arc = ~RWARC(1); let arc2 = ~arc.clone(); do task::try { do arc2.write_downgrade |write_mode| { @@ -581,7 +581,7 @@ mod tests { } #[test] #[ignore(cfg(windows))] fn test_rw_arc_no_poison_rr() { - let arc = ~rw_arc(1); + let arc = ~RWARC(1); let arc2 = ~arc.clone(); do task::try { do arc2.read |one| { @@ -594,7 +594,7 @@ mod tests { } #[test] #[ignore(cfg(windows))] fn test_rw_arc_no_poison_rw() { - let arc = ~rw_arc(1); + let arc = ~RWARC(1); let arc2 = ~arc.clone(); do task::try { do arc2.read |one| { @@ -607,7 +607,7 @@ mod tests { } #[test] #[ignore(cfg(windows))] fn test_rw_arc_no_poison_dr() { - let arc = ~rw_arc(1); + let arc = ~RWARC(1); let arc2 = ~arc.clone(); do task::try { do arc2.write_downgrade |write_mode| { @@ -623,7 +623,7 @@ mod tests { } #[test] fn test_rw_arc() { - let arc = ~rw_arc(0); + let arc = ~RWARC(0); let arc2 = ~arc.clone(); let (c,p) = pipes::stream(); @@ -662,7 +662,7 @@ mod tests { // (4) tells writer and all other readers to contend as it downgrades. // (5) Writer attempts to set state back to 42, while downgraded task // and all reader tasks assert that it's 31337. - let arc = ~rw_arc(0); + let arc = ~RWARC(0); // Reader tasks let mut reader_convos = ~[]; diff --git a/src/libstd/c_vec.rs b/src/libstd/c_vec.rs index afbc9826134..6af7f71cb30 100644 --- a/src/libstd/c_vec.rs +++ b/src/libstd/c_vec.rs @@ -28,7 +28,7 @@ */ export CVec; -export c_vec, c_vec_with_dtor; +export CVec, c_vec_with_dtor; export get, set; export len; export ptr; @@ -66,7 +66,7 @@ struct DtorRes { * * base - A foreign pointer to a buffer * * len - The number of elements in the buffer */ -unsafe fn c_vec(base: *mut T, len: uint) -> CVec { +unsafe fn CVec(base: *mut T, len: uint) -> CVec { return CVecCtor({ base: base, len: len, diff --git a/src/libstd/ebml.rs b/src/libstd/ebml.rs index 5b7f7553ddd..068ad608e68 100644 --- a/src/libstd/ebml.rs +++ b/src/libstd/ebml.rs @@ -6,7 +6,6 @@ import core::Option; import option::{Some, None}; -export doc; export Doc; export doc_at; export maybe_get_doc; @@ -75,7 +74,7 @@ fn vuint_at(data: &[u8], start: uint) -> {val: uint, next: uint} { } else { error!("vint too big"); fail; } } -fn doc(data: @~[u8]) -> Doc { +fn Doc(data: @~[u8]) -> Doc { return {data: data, start: 0u, end: vec::len::(*data)}; } @@ -619,7 +618,7 @@ fn test_option_int() { let mbuf = io::mem_buffer(); let ebml_w = ebml::Writer(io::mem_buffer_writer(mbuf)); serialize_0(ebml_w, v); - let ebml_doc = ebml::doc(@io::mem_buffer_buf(mbuf)); + let ebml_doc = ebml::Doc(@io::mem_buffer_buf(mbuf)); let deser = ebml_deserializer(ebml_doc); let v1 = deserialize_0(deser); debug!("v1 == %?", v1); diff --git a/src/libstd/sync.rs b/src/libstd/sync.rs index 5e35454da84..acd25bd7c7c 100644 --- a/src/libstd/sync.rs +++ b/src/libstd/sync.rs @@ -8,8 +8,8 @@ * in std. */ -export Condvar, Semaphore, Mutex, mutex, mutex_with_condvars; -export RWlock, rwlock, rwlock_with_condvars, RWlockReadMode, RWlockWriteMode; +export Condvar, Semaphore, Mutex, mutex_with_condvars; +export RWlock, rwlock_with_condvars, RWlockReadMode, RWlockWriteMode; import unsafe::{Exclusive, exclusive}; @@ -362,7 +362,7 @@ impl &Semaphore { struct Mutex { priv sem: Sem<~[mut Waitqueue]>; } /// Create a new mutex, with one associated condvar. -fn mutex() -> Mutex { mutex_with_condvars(1) } +fn Mutex() -> Mutex { mutex_with_condvars(1) } /** * Create a new mutex, with a specified number of associated condvars. This * will allow calling wait_on/signal_on/broadcast_on with condvar IDs between @@ -412,7 +412,7 @@ struct RWlock { } /// Create a new rwlock, with one associated condvar. -fn rwlock() -> RWlock { rwlock_with_condvars(1) } +fn RWlock() -> RWlock { rwlock_with_condvars(1) } /** * Create a new rwlock, with a specified number of associated condvars. @@ -745,7 +745,7 @@ mod tests { // Unsafely achieve shared state, and do the textbook // "load tmp <- ptr; inc tmp; store ptr <- tmp" dance. let (c,p) = pipes::stream(); - let m = ~mutex(); + let m = ~Mutex(); let m2 = ~m.clone(); let sharedstate = ~0; let ptr = ptr::addr_of(*sharedstate); @@ -773,7 +773,7 @@ mod tests { } #[test] fn test_mutex_cond_wait() { - let m = ~mutex(); + let m = ~Mutex(); // Child wakes up parent do m.lock_cond |cond| { @@ -805,7 +805,7 @@ mod tests { } #[cfg(test)] fn test_mutex_cond_broadcast_helper(num_waiters: uint) { - let m = ~mutex(); + let m = ~Mutex(); let mut ports = ~[]; for num_waiters.times { @@ -840,7 +840,7 @@ mod tests { } #[test] fn test_mutex_cond_no_waiter() { - let m = ~mutex(); + let m = ~Mutex(); let m2 = ~m.clone(); do task::try { do m.lock_cond |_x| { } @@ -852,7 +852,7 @@ mod tests { #[test] #[ignore(cfg(windows))] fn test_mutex_killed_simple() { // Mutex must get automatically unlocked if failed/killed within. - let m = ~mutex(); + let m = ~Mutex(); let m2 = ~m.clone(); let result: result::Result<(),()> = do task::try { @@ -868,7 +868,7 @@ mod tests { fn test_mutex_killed_cond() { // Getting killed during cond wait must not corrupt the mutex while // unwinding (e.g. double unlock). - let m = ~mutex(); + let m = ~Mutex(); let m2 = ~m.clone(); let result: result::Result<(),()> = do task::try { @@ -892,7 +892,7 @@ mod tests { } #[test] #[ignore(cfg(windows))] fn test_mutex_killed_broadcast() { - let m = ~mutex(); + let m = ~Mutex(); let m2 = ~m.clone(); let (c,p) = pipes::stream(); @@ -936,7 +936,7 @@ mod tests { #[test] fn test_mutex_cond_signal_on_0() { // Tests that signal_on(0) is equivalent to signal(). - let m = ~mutex(); + let m = ~Mutex(); do m.lock_cond |cond| { let m2 = ~m.clone(); do task::spawn { @@ -1040,17 +1040,17 @@ mod tests { } #[test] fn test_rwlock_readers_wont_modify_the_data() { - test_rwlock_exclusion(~rwlock(), Read, Write); - test_rwlock_exclusion(~rwlock(), Write, Read); - test_rwlock_exclusion(~rwlock(), Read, Downgrade); - test_rwlock_exclusion(~rwlock(), Downgrade, Read); + test_rwlock_exclusion(~RWlock(), Read, Write); + test_rwlock_exclusion(~RWlock(), Write, Read); + test_rwlock_exclusion(~RWlock(), Read, Downgrade); + test_rwlock_exclusion(~RWlock(), Downgrade, Read); } #[test] fn test_rwlock_writers_and_writers() { - test_rwlock_exclusion(~rwlock(), Write, Write); - test_rwlock_exclusion(~rwlock(), Write, Downgrade); - test_rwlock_exclusion(~rwlock(), Downgrade, Write); - test_rwlock_exclusion(~rwlock(), Downgrade, Downgrade); + test_rwlock_exclusion(~RWlock(), Write, Write); + test_rwlock_exclusion(~RWlock(), Write, Downgrade); + test_rwlock_exclusion(~RWlock(), Downgrade, Write); + test_rwlock_exclusion(~RWlock(), Downgrade, Downgrade); } #[cfg(test)] fn test_rwlock_handshake(+x: ~RWlock, mode1: RWlockMode, @@ -1084,32 +1084,32 @@ mod tests { } #[test] fn test_rwlock_readers_and_readers() { - test_rwlock_handshake(~rwlock(), Read, Read, false); + test_rwlock_handshake(~RWlock(), Read, Read, false); // The downgrader needs to get in before the reader gets in, otherwise // they cannot end up reading at the same time. - test_rwlock_handshake(~rwlock(), DowngradeRead, Read, false); - test_rwlock_handshake(~rwlock(), Read, DowngradeRead, true); + test_rwlock_handshake(~RWlock(), DowngradeRead, Read, false); + test_rwlock_handshake(~RWlock(), Read, DowngradeRead, true); // Two downgrade_reads can never both end up reading at the same time. } #[test] fn test_rwlock_downgrade_unlock() { // Tests that downgrade can unlock the lock in both modes - let x = ~rwlock(); + let x = ~RWlock(); do lock_rwlock_in_mode(x, Downgrade) { } test_rwlock_handshake(x, Read, Read, false); - let y = ~rwlock(); + let y = ~RWlock(); do lock_rwlock_in_mode(y, DowngradeRead) { } test_rwlock_exclusion(y, Write, Write); } #[test] fn test_rwlock_read_recursive() { - let x = ~rwlock(); + let x = ~RWlock(); do x.read { do x.read { } } } #[test] fn test_rwlock_cond_wait() { // As test_mutex_cond_wait above. - let x = ~rwlock(); + let x = ~RWlock(); // Child wakes up parent do x.write_cond |cond| { @@ -1154,7 +1154,7 @@ mod tests { x.write_cond(blk) } } - let x = ~rwlock(); + let x = ~RWlock(); let mut ports = ~[]; for num_waiters.times { @@ -1193,7 +1193,7 @@ mod tests { #[cfg(test)] #[ignore(cfg(windows))] fn rwlock_kill_helper(mode1: RWlockMode, mode2: RWlockMode) { // Mutex must get automatically unlocked if failed/killed within. - let x = ~rwlock(); + let x = ~RWlock(); let x2 = ~x.clone(); let result: result::Result<(),()> = do task::try { @@ -1231,8 +1231,8 @@ mod tests { #[test] #[should_fail] #[ignore(cfg(windows))] fn test_rwlock_downgrade_cant_swap() { // Tests that you can't downgrade with a different rwlock's token. - let x = ~rwlock(); - let y = ~rwlock(); + let x = ~RWlock(); + let y = ~RWlock(); do x.write_downgrade |xwrite| { let mut xopt = Some(xwrite); do y.write_downgrade |_ywrite| { diff --git a/src/rustc/metadata/csearch.rs b/src/rustc/metadata/csearch.rs index 2aa36a8e01b..0c98541a363 100644 --- a/src/rustc/metadata/csearch.rs +++ b/src/rustc/metadata/csearch.rs @@ -136,7 +136,7 @@ fn get_field_type(tcx: ty::ctxt, class_id: ast::def_id, def: ast::def_id) -> ty::ty_param_bounds_and_ty { let cstore = tcx.cstore; let cdata = cstore::get_crate_data(cstore, class_id.crate); - let all_items = ebml::get_doc(ebml::doc(cdata.data), tag_items); + let all_items = ebml::get_doc(ebml::Doc(cdata.data), tag_items); debug!("Looking up %?", class_id); let class_doc = expect(tcx.diag, decoder::maybe_find_item(class_id.node, all_items), diff --git a/src/rustc/metadata/decoder.rs b/src/rustc/metadata/decoder.rs index 18ad56b4ab2..ac9d3d01554 100644 --- a/src/rustc/metadata/decoder.rs +++ b/src/rustc/metadata/decoder.rs @@ -98,7 +98,7 @@ fn find_item(item_id: int, items: ebml::Doc) -> ebml::Doc { // Looks up an item in the given metadata and returns an ebml doc pointing // to the item data. fn lookup_item(item_id: int, data: @~[u8]) -> ebml::Doc { - let items = ebml::get_doc(ebml::doc(data), tag_items); + let items = ebml::get_doc(ebml::Doc(data), tag_items); match maybe_find_item(item_id, items) { None => fail(fmt!("lookup_item: id not found: %d", item_id)), Some(d) => d @@ -362,7 +362,7 @@ fn get_impl_traits(cdata: cmd, id: ast::node_id, tcx: ty::ctxt) -> ~[ty::t] { fn get_impl_method(intr: ident_interner, cdata: cmd, id: ast::node_id, name: ast::ident) -> ast::def_id { - let items = ebml::get_doc(ebml::doc(cdata.data), tag_items); + let items = ebml::get_doc(ebml::Doc(cdata.data), tag_items); let mut found = None; for ebml::tagged_docs(find_item(id, items), tag_item_impl_method) |mid| { let m_did = ebml::with_doc_data(mid, |d| parse_def_id(d)); @@ -375,7 +375,7 @@ fn get_impl_method(intr: ident_interner, cdata: cmd, id: ast::node_id, fn get_class_method(intr: ident_interner, cdata: cmd, id: ast::node_id, name: ast::ident) -> ast::def_id { - let items = ebml::get_doc(ebml::doc(cdata.data), tag_items); + let items = ebml::get_doc(ebml::Doc(cdata.data), tag_items); let mut found = None; let cls_items = match maybe_find_item(id, items) { Some(it) => it, @@ -396,7 +396,7 @@ fn get_class_method(intr: ident_interner, cdata: cmd, id: ast::node_id, } fn class_dtor(cdata: cmd, id: ast::node_id) -> Option { - let items = ebml::get_doc(ebml::doc(cdata.data), tag_items); + let items = ebml::get_doc(ebml::Doc(cdata.data), tag_items); let mut found = None; let cls_items = match maybe_find_item(id, items) { Some(it) => it, @@ -445,7 +445,7 @@ struct path_entry { /// Iterates over all the paths in the given crate. fn each_path(intr: ident_interner, cdata: cmd, f: fn(path_entry) -> bool) { - let root = ebml::doc(cdata.data); + let root = ebml::Doc(cdata.data); let items = ebml::get_doc(root, tag_items); let items_data = ebml::get_doc(items, tag_items_data); @@ -564,7 +564,7 @@ fn maybe_get_item_ast(intr: ident_interner, cdata: cmd, tcx: ty::ctxt, fn get_enum_variants(intr: ident_interner, cdata: cmd, id: ast::node_id, tcx: ty::ctxt) -> ~[ty::variant_info] { let data = cdata.data; - let items = ebml::get_doc(ebml::doc(data), tag_items); + let items = ebml::get_doc(ebml::Doc(data), tag_items); let item = find_item(id, items); let mut infos: ~[ty::variant_info] = ~[]; let variant_ids = enum_variant_ids(item, cdata); @@ -888,7 +888,7 @@ fn list_crate_attributes(intr: ident_interner, md: ebml::Doc, hash: ~str, } fn get_crate_attributes(data: @~[u8]) -> ~[ast::attribute] { - return get_attributes(ebml::doc(data)); + return get_attributes(ebml::Doc(data)); } type crate_dep = {cnum: ast::crate_num, name: ast::ident, @@ -896,7 +896,7 @@ type crate_dep = {cnum: ast::crate_num, name: ast::ident, fn get_crate_deps(intr: ident_interner, data: @~[u8]) -> ~[crate_dep] { let mut deps: ~[crate_dep] = ~[]; - let cratedoc = ebml::doc(data); + let cratedoc = ebml::Doc(data); let depsdoc = ebml::get_doc(cratedoc, tag_crate_deps); let mut crate_num = 1; fn docstr(doc: ebml::Doc, tag_: uint) -> ~str { @@ -925,7 +925,7 @@ fn list_crate_deps(intr: ident_interner, data: @~[u8], out: io::Writer) { } fn get_crate_hash(data: @~[u8]) -> ~str { - let cratedoc = ebml::doc(data); + let cratedoc = ebml::Doc(data); let hashdoc = ebml::get_doc(cratedoc, tag_crate_hash); return str::from_bytes(ebml::doc_data(hashdoc)); } @@ -981,7 +981,7 @@ fn get_crate_module_paths(intr: ident_interner, cdata: cmd) fn list_crate_metadata(intr: ident_interner, bytes: @~[u8], out: io::Writer) { let hash = get_crate_hash(bytes); - let md = ebml::doc(bytes); + let md = ebml::Doc(bytes); list_crate_attributes(intr, md, hash, out); list_crate_deps(intr, bytes, out); } diff --git a/src/rustc/middle/astencode.rs b/src/rustc/middle/astencode.rs index 5daed725d24..3f329bc9b76 100644 --- a/src/rustc/middle/astencode.rs +++ b/src/rustc/middle/astencode.rs @@ -939,7 +939,7 @@ fn roundtrip(in_item: @ast::item) { let mbuf = io::mem_buffer(); let ebml_w = ebml::Writer(io::mem_buffer_writer(mbuf)); encode_item_ast(ebml_w, in_item); - let ebml_doc = ebml::doc(@io::mem_buffer_buf(mbuf)); + let ebml_doc = ebml::Doc(@io::mem_buffer_buf(mbuf)); let out_item = decode_item_ast(ebml_doc); let exp_str = diff --git a/src/test/bench/graph500-bfs.rs b/src/test/bench/graph500-bfs.rs index 70c4bf20f75..cb94e43d8e7 100644 --- a/src/test/bench/graph500-bfs.rs +++ b/src/test/bench/graph500-bfs.rs @@ -241,7 +241,7 @@ fn pbfs(&&graph: arc::ARC, key: node_id) -> bfs_result { i += 1u; let old_len = colors.len(); - let color = arc::arc(colors); + let color = arc::ARC(colors); colors = do par::mapi_factory(*arc::get(&color)) { let colors = arc::clone(&color); @@ -414,7 +414,7 @@ fn main(args: ~[~str]) { let mut total_seq = 0.0; let mut total_par = 0.0; - let graph_arc = arc::arc(copy graph); + let graph_arc = arc::ARC(copy graph); 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 55c261566bf..9145a586161 100644 --- a/src/test/bench/msgsend-ring-mutex-arcs.rs +++ b/src/test/bench/msgsend-ring-mutex-arcs.rs @@ -32,7 +32,7 @@ fn recv(p: &pipe) -> uint { } fn init() -> (pipe,pipe) { - let m = arc::mutex_arc(~[]); + let m = arc::MutexARC(~[]); ((&m).clone(), m) } diff --git a/src/test/bench/msgsend-ring-rw-arcs.rs b/src/test/bench/msgsend-ring-rw-arcs.rs index 4331e563958..7f7c42be274 100644 --- a/src/test/bench/msgsend-ring-rw-arcs.rs +++ b/src/test/bench/msgsend-ring-rw-arcs.rs @@ -32,7 +32,7 @@ fn recv(p: &pipe) -> uint { } fn init() -> (pipe,pipe) { - let x = arc::rw_arc(~[]); + let x = arc::RWARC(~[]); ((&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 40f114a7879..52ea25257ad 100644 --- a/src/test/compile-fail/arc-rw-cond-shouldnt-escape.rs +++ b/src/test/compile-fail/arc-rw-cond-shouldnt-escape.rs @@ -2,7 +2,7 @@ use std; import std::arc; fn main() { - let x = ~arc::rw_arc(1); + let x = ~arc::RWARC(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 d7db99a4d5b..104e4f103d3 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 @@ -1,7 +1,7 @@ use std; import std::arc; fn main() { - let x = ~arc::rw_arc(1); + let x = ~arc::RWARC(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 d861fb1cb79..1639f9a86b4 100644 --- a/src/test/compile-fail/arc-rw-state-shouldnt-escape.rs +++ b/src/test/compile-fail/arc-rw-state-shouldnt-escape.rs @@ -2,7 +2,7 @@ use std; import std::arc; fn main() { - let x = ~arc::rw_arc(1); + let x = ~arc::RWARC(1); let mut y = None; 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 4e0d2b516df..2b28172e3fd 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 @@ -2,7 +2,7 @@ use std; import std::arc; fn main() { - let x = ~arc::rw_arc(1); + let x = ~arc::RWARC(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 d7d47644521..7aa97d7d1ee 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 @@ -2,7 +2,7 @@ use std; import std::arc; fn main() { - let x = ~arc::rw_arc(1); + let x = ~arc::RWARC(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 aab5d1b7a5f..606d6e19950 100644 --- a/src/test/compile-fail/no-capture-arc.rs +++ b/src/test/compile-fail/no-capture-arc.rs @@ -6,7 +6,7 @@ import comm::*; 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(v); do task::spawn() { let v = *arc::get(&arc_v); diff --git a/src/test/compile-fail/no-reuse-move-arc.rs b/src/test/compile-fail/no-reuse-move-arc.rs index 6080614ca48..dcdd57c898b 100644 --- a/src/test/compile-fail/no-reuse-move-arc.rs +++ b/src/test/compile-fail/no-reuse-move-arc.rs @@ -4,7 +4,7 @@ import comm::*; 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(v); do task::spawn() |move arc_v| { //~ NOTE move of variable occurred here let v = *arc::get(&arc_v); diff --git a/src/test/compile-fail/sync-cond-shouldnt-escape.rs b/src/test/compile-fail/sync-cond-shouldnt-escape.rs index dd170eed845..704d1a2e443 100644 --- a/src/test/compile-fail/sync-cond-shouldnt-escape.rs +++ b/src/test/compile-fail/sync-cond-shouldnt-escape.rs @@ -3,7 +3,7 @@ use std; import std::sync; fn main() { - let m = ~sync::mutex(); + let m = ~sync::Mutex(); 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 7ce76f71b0f..c64c75f8040 100644 --- a/src/test/compile-fail/sync-rwlock-cond-shouldnt-escape.rs +++ b/src/test/compile-fail/sync-rwlock-cond-shouldnt-escape.rs @@ -2,7 +2,7 @@ use std; import std::sync; fn main() { - let x = ~sync::rwlock(); + let x = ~sync::RWlock(); 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 7c8d743b86b..373c2f80efa 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 @@ -2,7 +2,7 @@ use std; import std::sync; fn main() { - let x = ~sync::rwlock(); + let x = ~sync::RWlock(); 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 39727442954..79aff5f3a55 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 @@ -2,7 +2,7 @@ use std; import std::sync; fn main() { - let x = ~sync::rwlock(); + let x = ~sync::RWlock(); 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 c78fa183e70..fde9656ca81 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 @@ -2,7 +2,7 @@ use std; import std::sync; fn main() { - let x = ~sync::rwlock(); + let x = ~sync::RWlock(); let mut y = None; do x.write_downgrade |write_mode| { y = Some(write_mode); diff --git a/src/test/run-pass/auto_serialize.rs b/src/test/run-pass/auto_serialize.rs index d2d675577aa..62201eebe41 100644 --- a/src/test/run-pass/auto_serialize.rs +++ b/src/test/run-pass/auto_serialize.rs @@ -23,7 +23,7 @@ fn test_ser_and_deser(a1: A, let buf = io::mem_buffer(); let w = ebml::Writer(buf as io::Writer); ebml_ser_fn(w, a1); - let d = ebml::doc(@io::mem_buffer_buf(buf)); + let d = ebml::Doc(@io::mem_buffer_buf(buf)); let a2 = ebml_deser_fn(ebml::ebml_deserializer(d)); io::print(~"\na1 = "); io_ser_fn(io::stdout(), a1);