diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-09-07 14:50:47 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-07 16:12:15 -0700 |
| commit | f0eae8f1c19a051ab750383e479f979c32d4598a (patch) | |
| tree | f4ac6cb0637579d32aeb3dc7d9174dc5a6b3efce | |
| parent | 3078830934ba5596e7eac86825636b49451e40e3 (diff) | |
| download | rust-f0eae8f1c19a051ab750383e479f979c32d4598a.tar.gz rust-f0eae8f1c19a051ab750383e479f979c32d4598a.zip | |
Convert field terminators to commas. Stop parsing semis.
91 files changed, 284 insertions, 284 deletions
diff --git a/src/libcore/future.rs b/src/libcore/future.rs index bd94b7c726d..cd0d2b25e95 100644 --- a/src/libcore/future.rs +++ b/src/libcore/future.rs @@ -33,7 +33,7 @@ export future_pipe; #[doc = "The future type"] struct Future<A> { - /*priv*/ mut state: FutureState<A>; + /*priv*/ mut state: FutureState<A>, } priv enum FutureState<A> { diff --git a/src/libcore/hash.rs b/src/libcore/hash.rs index 7ca42f320d9..48fc9f205b9 100644 --- a/src/libcore/hash.rs +++ b/src/libcore/hash.rs @@ -176,15 +176,15 @@ fn default_state() -> State { } struct SipState { - k0: u64; - k1: u64; - mut length: uint; // how many bytes we've processed - mut v0: u64; // hash state - mut v1: u64; - mut v2: u64; - mut v3: u64; - tail: [mut u8]/8; // unprocessed bytes - mut ntail: uint; // how many bytes in tail are valid + k0: u64, + k1: u64, + mut length: uint, // how many bytes we've processed + mut v0: u64, // hash state + mut v1: u64, + mut v2: u64, + mut v3: u64, + tail: [mut u8]/8, // unprocessed bytes + mut ntail: uint, // how many bytes in tail are valid } #[inline(always)] diff --git a/src/libcore/managed.rs b/src/libcore/managed.rs index e2f0fd62204..b3119b9d24d 100644 --- a/src/libcore/managed.rs +++ b/src/libcore/managed.rs @@ -20,8 +20,8 @@ export Managed; enum Mode { ReadOnly, Mutable, Immutable } struct Data<T> { - priv mut value: T; - priv mut mode: Mode; + priv mut value: T, + priv mut mode: Mode } type Managed<T> = @Data<T>; diff --git a/src/libcore/path.rs b/src/libcore/path.rs index a9dda62d950..a8827c08a7c 100644 --- a/src/libcore/path.rs +++ b/src/libcore/path.rs @@ -5,15 +5,15 @@ use cmp::Eq; struct WindowsPath { - host: Option<~str>; - device: Option<~str>; - is_absolute: bool; - components: ~[~str]; + host: Option<~str>, + device: Option<~str>, + is_absolute: bool, + components: ~[~str], } struct PosixPath { - is_absolute: bool; - components: ~[~str]; + is_absolute: bool, + components: ~[~str], } trait GenericPath { diff --git a/src/libcore/pipes.rs b/src/libcore/pipes.rs index f74e4bca40c..da4b1b04673 100644 --- a/src/libcore/pipes.rs +++ b/src/libcore/pipes.rs @@ -465,7 +465,7 @@ fn try_recv<T: send, Tbuffer: send>(+p: RecvPacketBuffered<T, Tbuffer>) let p = unsafe { &*p_ }; struct DropState { - p: &PacketHeader; + p: &PacketHeader, drop { if task::failing() { diff --git a/src/libcore/send_map.rs b/src/libcore/send_map.rs index 8c805798327..3eb8e581cbc 100644 --- a/src/libcore/send_map.rs +++ b/src/libcore/send_map.rs @@ -30,16 +30,16 @@ mod linear { const initial_capacity: uint = 32u; // 2^5 struct Bucket<K:Eq Hash,V> { - hash: uint; - key: K; - value: V; + hash: uint, + key: K, + value: V, } struct LinearMap<K:Eq Hash,V> { - k0: u64; - k1: u64; - resize_at: uint; - size: uint; - buckets: ~[Option<Bucket<K,V>>]; + k0: u64, + k1: u64, + resize_at: uint, + size: uint, + buckets: ~[Option<Bucket<K,V>>], } // FIXME(#3148) -- we could rewrite found_entry diff --git a/src/libcore/sys.rs b/src/libcore/sys.rs index 3ca9a0aef17..8eee6088630 100644 --- a/src/libcore/sys.rs +++ b/src/libcore/sys.rs @@ -28,8 +28,8 @@ enum TypeDesc = { /// The representation of a Rust closure struct Closure { - code: *(); - env: *(); + code: *(), + env: *(), } #[abi = "cdecl"] diff --git a/src/libcore/unsafe.rs b/src/libcore/unsafe.rs index 4cf6ec97466..2b57d694cbf 100644 --- a/src/libcore/unsafe.rs +++ b/src/libcore/unsafe.rs @@ -86,15 +86,15 @@ unsafe fn copy_lifetime<S,T>(_ptr: &a/S, ptr: &T) -> &a/T { type UnwrapProto = ~mut Option<(pipes::ChanOne<()>, pipes::PortOne<bool>)>; struct ArcData<T> { - mut count: libc::intptr_t; - mut unwrapper: libc::uintptr_t; // either a UnwrapProto or 0 + mut count: libc::intptr_t, + mut unwrapper: libc::uintptr_t, // either a UnwrapProto or 0 // FIXME(#3224) should be able to make this non-option to save memory, and // in unwrap() use "let ~ArcData { data: result, _ } = thing" to unwrap it - mut data: Option<T>; + mut data: Option<T>, } struct ArcDestruct<T> { - mut data: *libc::c_void; + mut data: *libc::c_void, drop unsafe { if self.data.is_null() { return; // Happens when destructing an unwrapper's handle. @@ -140,8 +140,8 @@ fn ArcDestruct<T>(data: *libc::c_void) -> ArcDestruct<T> { unsafe fn unwrap_shared_mutable_state<T: send>(+rc: SharedMutableState<T>) -> T { struct DeathThroes<T> { - mut ptr: Option<~ArcData<T>>; - mut response: Option<pipes::ChanOne<bool>>; + mut ptr: Option<~ArcData<T>>, + mut response: Option<pipes::ChanOne<bool>>, drop unsafe { let response = option::swap_unwrap(&mut self.response); // In case we get killed early, we need to tell the person who @@ -312,11 +312,11 @@ impl LittleLock { } } -struct ExData<T: send> { lock: LittleLock; mut failed: bool; mut data: T; } +struct ExData<T: send> { lock: LittleLock, mut failed: bool, mut data: T, } /** * An arc over mutable data that is protected by a lock. For library use only. */ -struct Exclusive<T: send> { x: SharedMutableState<ExData<T>>; } +struct Exclusive<T: send> { x: SharedMutableState<ExData<T>> } fn exclusive<T:send >(+user_data: T) -> Exclusive<T> { let data = ExData { diff --git a/src/libcore/util.rs b/src/libcore/util.rs index a27b8fe86bc..bb33bad1f85 100644 --- a/src/libcore/util.rs +++ b/src/libcore/util.rs @@ -54,7 +54,7 @@ fn replace<T>(dest: &mut T, +src: T) -> T { /// A non-copyable dummy type. struct NonCopyable { - i: (); + i: (), drop { } } diff --git a/src/libstd/arc.rs b/src/libstd/arc.rs index d8c32a26434..b5af4af06c3 100644 --- a/src/libstd/arc.rs +++ b/src/libstd/arc.rs @@ -19,7 +19,7 @@ export RWARC, rw_arc_with_condvars, RWWriteMode, RWReadMode; export unwrap_rw_arc; /// As sync::condvar, a mechanism for unlock-and-descheduling and signalling. -struct Condvar { is_mutex: bool; failed: &mut bool; cond: &sync::Condvar; } +struct Condvar { is_mutex: bool, failed: &mut bool, cond: &sync::Condvar } impl &Condvar { /// Atomically exit the associated ARC and block until a signal is sent. @@ -69,7 +69,7 @@ impl &Condvar { ****************************************************************************/ /// An atomically reference counted wrapper for shared immutable state. -struct ARC<T: const send> { x: SharedMutableState<T>; } +struct ARC<T: const send> { x: SharedMutableState<T> } /// Create an atomically reference counted wrapper. fn ARC<T: const send>(+data: T) -> ARC<T> { @@ -114,9 +114,9 @@ fn unwrap<T: const send>(+rc: ARC<T>) -> T { ****************************************************************************/ #[doc(hidden)] -struct MutexARCInner<T: send> { lock: Mutex; failed: bool; data: T; } +struct MutexARCInner<T: send> { lock: Mutex, failed: bool, data: T } /// An ARC with mutable data protected by a blocking mutex. -struct MutexARC<T: send> { x: SharedMutableState<MutexARCInner<T>>; } +struct MutexARC<T: send> { x: SharedMutableState<MutexARCInner<T>> } /// Create a mutex-protected ARC with the supplied data. fn MutexARC<T: send>(+user_data: T) -> MutexARC<T> { @@ -222,7 +222,7 @@ fn check_poison(is_mutex: bool, failed: bool) { #[doc(hidden)] struct PoisonOnFail { - failed: &mut bool; + failed: &mut bool, drop { /* assert !*self.failed; -- might be false in case of cond.wait() */ if task::failing() { *self.failed = true; } @@ -240,7 +240,7 @@ fn PoisonOnFail(failed: &r/mut bool) -> PoisonOnFail/&r { ****************************************************************************/ #[doc(hidden)] -struct RWARCInner<T: const send> { lock: RWlock; failed: bool; data: T; } +struct RWARCInner<T: const send> { lock: RWlock, failed: bool, data: T } /** * A dual-mode ARC protected by a reader-writer lock. The data can be accessed * mutably or immutably, and immutably-accessing tasks may run concurrently. @@ -248,8 +248,8 @@ struct RWARCInner<T: const send> { lock: RWlock; failed: bool; data: T; } * Unlike mutex_arcs, rw_arcs are safe, because they cannot be nested. */ struct RWARC<T: const send> { - x: SharedMutableState<RWARCInner<T>>; - mut cant_nest: (); + x: SharedMutableState<RWARCInner<T>>, + mut cant_nest: () } /// Create a reader/writer ARC with the supplied data. diff --git a/src/libstd/arena.rs b/src/libstd/arena.rs index b59ec38b352..a9010759ef9 100644 --- a/src/libstd/arena.rs +++ b/src/libstd/arena.rs @@ -51,9 +51,9 @@ struct Arena { // The head is seperated out from the list as a unbenchmarked // microoptimization, to avoid needing to case on the list to // access the head. - priv mut head: Chunk; - priv mut pod_head: Chunk; - priv mut chunks: @List<Chunk>; + priv mut head: Chunk, + priv mut pod_head: Chunk, + priv mut chunks: @List<Chunk>, drop { unsafe { destroy_chunk(self.head); diff --git a/src/libstd/cell.rs b/src/libstd/cell.rs index 2325b0e092e..e67be74c642 100644 --- a/src/libstd/cell.rs +++ b/src/libstd/cell.rs @@ -5,7 +5,7 @@ /// Similar to a mutable option type, but friendlier. struct Cell<T> { - mut value: Option<T>; + mut value: Option<T> } /// Creates a new full cell with the given value. diff --git a/src/libstd/comm.rs b/src/libstd/comm.rs index b9934e425b9..d286b496923 100644 --- a/src/libstd/comm.rs +++ b/src/libstd/comm.rs @@ -14,8 +14,8 @@ export DuplexStream; /// An extension of `pipes::stream` that allows both sending and receiving. struct DuplexStream<T: send, U: send> : Channel<T>, Recv<U>, Selectable { - priv chan: Chan<T>; - priv port: Port <U>; + priv chan: Chan<T>, + priv port: Port <U>, fn send(+x: T) { self.chan.send(x) diff --git a/src/libstd/map.rs b/src/libstd/map.rs index c7eba5bb8eb..3db1c3407df 100644 --- a/src/libstd/map.rs +++ b/src/libstd/map.rs @@ -113,17 +113,17 @@ mod chained { const initial_capacity: uint = 32u; // 2^5 struct entry<K, V> { - hash: uint; - key: K; - value: V; - mut next: Option<@entry<K, V>>; + hash: uint, + key: K, + value: V, + mut next: Option<@entry<K, V>> } struct hashmap_<K, V> { - mut count: uint; - mut chains: ~[mut Option<@entry<K,V>>]; - hasher: hashfn<K>; - eqer: eqfn<K>; + mut count: uint, + mut chains: ~[mut Option<@entry<K,V>>], + hasher: hashfn<K>, + eqer: eqfn<K> } type t<K, V> = @hashmap_<K, V>; diff --git a/src/libstd/sync.rs b/src/libstd/sync.rs index 264bd45a130..45ab8d4c427 100644 --- a/src/libstd/sync.rs +++ b/src/libstd/sync.rs @@ -24,8 +24,8 @@ type WaitEnd = pipes::PortOne<()>; type SignalEnd = pipes::ChanOne<()>; // A doubly-ended queue of waiting tasks. #[doc(hidden)] -struct Waitqueue { head: pipes::Port<SignalEnd>; - tail: pipes::Chan<SignalEnd>; } +struct Waitqueue { head: pipes::Port<SignalEnd>, + tail: pipes::Chan<SignalEnd> } fn new_waitqueue() -> Waitqueue { let (block_tail, block_head) = pipes::stream(); @@ -63,11 +63,11 @@ fn broadcast_waitqueue(q: &Waitqueue) -> uint { // The building-block used to make semaphores, mutexes, and rwlocks. #[doc(hidden)] struct SemInner<Q> { - mut count: int; - waiters: Waitqueue; + mut count: int, + waiters: Waitqueue, // Can be either unit or another waitqueue. Some sems shouldn't come with // a condition variable attached, others should. - blocked: Q; + blocked: Q } #[doc(hidden)] enum Sem<Q: send> = Exclusive<SemInner<Q>>; @@ -153,7 +153,7 @@ impl &Sem<~[mut Waitqueue]> { // FIXME(#3136) should go inside of access() #[doc(hidden)] struct SemRelease { - sem: &Sem<()>; + sem: &Sem<()>, drop { self.sem.release(); } } @@ -165,7 +165,7 @@ fn SemRelease(sem: &r/Sem<()>) -> SemRelease/&r { #[doc(hidden)] struct SemAndSignalRelease { - sem: &Sem<~[mut Waitqueue]>; + sem: &Sem<~[mut Waitqueue]>, drop { self.sem.release(); } } @@ -177,7 +177,7 @@ fn SemAndSignalRelease(sem: &r/Sem<~[mut Waitqueue]>) } /// A mechanism for atomic-unlock-and-deschedule blocking and signalling. -struct Condvar { priv sem: &Sem<~[mut Waitqueue]>; drop { } } +struct Condvar { priv sem: &Sem<~[mut Waitqueue]>, drop { } } impl &Condvar { /** @@ -245,7 +245,7 @@ impl &Condvar { // mutex during unwinding. As long as the wrapper (mutex, etc) is // bounded in when it gets released, this shouldn't hang forever. struct SemAndSignalReacquire { - sem: &Sem<~[mut Waitqueue]>; + sem: &Sem<~[mut Waitqueue]>, drop unsafe { // Needs to succeed, instead of itself dying. do task::unkillable { @@ -338,7 +338,7 @@ impl &Sem<~[mut Waitqueue]> { ****************************************************************************/ /// A counting, blocking, bounded-waiting semaphore. -struct Semaphore { priv sem: Sem<()>; } +struct Semaphore { priv sem: Sem<()> } /// Create a new semaphore with the specified count. fn semaphore(count: int) -> Semaphore { @@ -377,7 +377,7 @@ impl &Semaphore { * A task which fails while holding a mutex will unlock the mutex as it * unwinds. */ -struct Mutex { priv sem: Sem<~[mut Waitqueue]>; } +struct Mutex { priv sem: Sem<~[mut Waitqueue]> } /// Create a new mutex, with one associated condvar. fn Mutex() -> Mutex { mutex_with_condvars(1) } @@ -412,8 +412,8 @@ impl &Mutex { #[doc(hidden)] struct RWlockInner { - read_mode: bool; - read_count: uint; + read_mode: bool, + read_count: uint } /** @@ -424,9 +424,9 @@ struct RWlockInner { * unwinds. */ struct RWlock { - /* priv */ order_lock: Semaphore; - /* priv */ access_lock: Sem<~[mut Waitqueue]>; - /* priv */ state: Exclusive<RWlockInner>; + /* priv */ order_lock: Semaphore, + /* priv */ access_lock: Sem<~[mut Waitqueue]>, + /* priv */ state: Exclusive<RWlockInner> } /// Create a new rwlock, with one associated condvar. @@ -584,7 +584,7 @@ impl &RWlock { // FIXME(#3136) should go inside of read() #[doc(hidden)] struct RWlockReleaseRead { - lock: &RWlock; + lock: &RWlock, drop unsafe { do task::unkillable { let mut last_reader = false; @@ -613,7 +613,7 @@ fn RWlockReleaseRead(lock: &r/RWlock) -> RWlockReleaseRead/&r { // FIXME(#3136) should go inside of downgrade() #[doc(hidden)] struct RWlockReleaseDowngrade { - lock: &RWlock; + lock: &RWlock, drop unsafe { do task::unkillable { let mut writer_or_last_reader = false; @@ -647,9 +647,9 @@ fn RWlockReleaseDowngrade(lock: &r/RWlock) -> RWlockReleaseDowngrade/&r { } /// The "write permission" token used for rwlock.write_downgrade(). -struct RWlockWriteMode { /* priv */ lock: &RWlock; drop { } } +struct RWlockWriteMode { /* priv */ lock: &RWlock, drop { } } /// The "read permission" token used for rwlock.write_downgrade(). -struct RWlockReadMode { priv lock: &RWlock; drop { } } +struct RWlockReadMode { priv lock: &RWlock, drop { } } impl &RWlockWriteMode { /// Access the pre-downgrade rwlock in write mode. @@ -956,7 +956,7 @@ mod tests { assert woken == 0; } struct SendOnFailure { - c: pipes::Chan<()>; + c: pipes::Chan<()>, drop { self.c.send(()); } } diff --git a/src/libsyntax/ext/qquote.rs b/src/libsyntax/ext/qquote.rs index 4ebd3eafe3d..638e46a9cdb 100644 --- a/src/libsyntax/ext/qquote.rs +++ b/src/libsyntax/ext/qquote.rs @@ -15,10 +15,10 @@ use io::*; use codemap::span; struct gather_item { - lo: uint; - hi: uint; - e: @ast::expr; - constr: ~str; + lo: uint, + hi: uint, + e: @ast::expr, + constr: ~str } type aq_ctxt = @{lo: uint, gather: DVec<gather_item>}; diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 1425831fa6e..015399e62b1 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2731,7 +2731,7 @@ struct parser { !self.token_is_pound_or_doc_comment(self.token) { let a_var = self.parse_instance_var(vis); match self.token { - token::SEMI | token::COMMA => { + token::COMMA => { self.bump(); } token::RBRACE => {} diff --git a/src/rustc/back/link.rs b/src/rustc/back/link.rs index afd94e4f437..2a9c792da14 100644 --- a/src/rustc/back/link.rs +++ b/src/rustc/back/link.rs @@ -77,8 +77,8 @@ mod jit { } struct Closure { - code: *(); - env: *(); + code: *(), + env: *(), } fn exec(sess: session, diff --git a/src/rustc/middle/liveness.rs b/src/rustc/middle/liveness.rs index bb3d1d26d65..9aca98f61e5 100644 --- a/src/rustc/middle/liveness.rs +++ b/src/rustc/middle/liveness.rs @@ -241,10 +241,10 @@ enum LocalKind { } struct LocalInfo { - id: node_id; - ident: ident; - is_mutbl: bool; - kind: LocalKind; + id: node_id, + ident: ident, + is_mutbl: bool, + kind: LocalKind, } enum VarKind { @@ -268,18 +268,18 @@ fn relevant_def(def: def) -> Option<RelevantDef> { } struct IrMaps { - tcx: ty::ctxt; - method_map: typeck::method_map; - last_use_map: last_use_map; - - mut num_live_nodes: uint; - mut num_vars: uint; - live_node_map: hashmap<node_id, LiveNode>; - variable_map: hashmap<node_id, Variable>; - field_map: hashmap<ident, Variable>; - capture_map: hashmap<node_id, @~[CaptureInfo]>; - mut var_kinds: ~[VarKind]; - mut lnks: ~[LiveNodeKind]; + tcx: ty::ctxt, + method_map: typeck::method_map, + last_use_map: last_use_map, + + mut num_live_nodes: uint, + mut num_vars: uint, + live_node_map: hashmap<node_id, LiveNode>, + variable_map: hashmap<node_id, Variable>, + field_map: hashmap<ident, Variable>, + capture_map: hashmap<node_id, @~[CaptureInfo]>, + mut var_kinds: ~[VarKind], + mut lnks: ~[LiveNodeKind], } fn IrMaps(tcx: ty::ctxt, method_map: typeck::method_map, diff --git a/src/rustc/middle/mem_categorization.rs b/src/rustc/middle/mem_categorization.rs index 77e234770e6..7440d37ae5d 100644 --- a/src/rustc/middle/mem_categorization.rs +++ b/src/rustc/middle/mem_categorization.rs @@ -415,8 +415,8 @@ impl ty::ctxt: get_type_for_node { } struct mem_categorization_ctxt { - tcx: ty::ctxt; - method_map: typeck::method_map; + tcx: ty::ctxt, + method_map: typeck::method_map, } impl &mem_categorization_ctxt { diff --git a/src/rustc/middle/region.rs b/src/rustc/middle/region.rs index 514a816a63a..9b1065cf863 100644 --- a/src/rustc/middle/region.rs +++ b/src/rustc/middle/region.rs @@ -42,11 +42,11 @@ Encodes the bounding lifetime for a given AST node: type region_map = hashmap<ast::node_id, ast::node_id>; struct ctxt { - sess: session; - def_map: resolve::DefMap; + sess: session, + def_map: resolve::DefMap, // Generated maps: - region_map: region_map; + region_map: region_map, // Generally speaking, expressions are parented to their innermost // enclosing block. But some kinds of expressions serve as @@ -55,7 +55,7 @@ struct ctxt { // the condition in a while loop is always a parent. In those // cases, we add the node id of such an expression to this set so // that when we visit it we can view it as a parent. - root_exprs: hashmap<ast::node_id, ()>; + root_exprs: hashmap<ast::node_id, ()>, // The parent scope is the innermost block, statement, call, or alt // expression during the execution of which the current expression @@ -88,7 +88,7 @@ struct ctxt { // Here, the first argument `&**x` will be a borrow of the `~int`, // but the second argument overwrites that very value! Bad. // (This test is borrowck-pure-scope-in-call.rs, btw) - parent: parent; + parent: parent, } /// Returns true if `subscope` is equal to or is lexically nested inside diff --git a/src/rustc/middle/resolve.rs b/src/rustc/middle/resolve.rs index 375d0c95809..1b7f2d60bd7 100644 --- a/src/rustc/middle/resolve.rs +++ b/src/rustc/middle/resolve.rs @@ -67,8 +67,8 @@ use str_eq = str::eq; type DefMap = hashmap<node_id,def>; struct binding_info { - span: span; - binding_mode: binding_mode; + span: span, + binding_mode: binding_mode, } // Map from the name in a pattern to its binding mode. @@ -100,9 +100,9 @@ type ExportMap = hashmap<node_id, ~[Export]>; type ExportMap2 = hashmap<node_id, ~[Export2]>; struct Export2 { - name: ~str; // The name of the target. - def_id: def_id; // The definition of the target. - reexport: bool; // Whether this is a reexport. + name: ~str, // The name of the target. + def_id: def_id, // The definition of the target. + reexport: bool, // Whether this is a reexport. } enum PatternBindingMode { @@ -493,8 +493,8 @@ impl Privacy : cmp::Eq { // Records a possibly-private definition. struct Definition { - privacy: Privacy; - def: def; + privacy: Privacy, + def: def, } // Records the definitions (at most one for each namespace) that a name is diff --git a/src/rustc/middle/trans/alt.rs b/src/rustc/middle/trans/alt.rs index 6884bc48d62..fb7c8fae337 100644 --- a/src/rustc/middle/trans/alt.rs +++ b/src/rustc/middle/trans/alt.rs @@ -72,9 +72,9 @@ fn variant_opt(tcx: ty::ctxt, pat_id: ast::node_id) -> opt { } struct binding { - val: ValueRef; - mode: ast::binding_mode; - ty: ty::t; + val: ValueRef, + mode: ast::binding_mode, + ty: ty::t } type bind_map = ~[{ @@ -683,10 +683,10 @@ fn compile_submatch(bcx: block, m: match_, vals: ~[ValueRef], } struct phi_binding { - pat_id: ast::node_id; - phi_val: ValueRef; - mode: ast::binding_mode; - ty: ty::t; + pat_id: ast::node_id, + phi_val: ValueRef, + mode: ast::binding_mode, + ty: ty::t } type phi_bindings_list = ~[phi_binding]; diff --git a/src/rustc/middle/trans/callee.rs b/src/rustc/middle/trans/callee.rs index db6e9832ffd..a92f8c9adf6 100644 --- a/src/rustc/middle/trans/callee.rs +++ b/src/rustc/middle/trans/callee.rs @@ -21,14 +21,14 @@ use util::common::indenter; // item. Note that this is just the fn-ptr and is not a Rust closure // value (which is a pair). struct FnData { - llfn: ValueRef; + llfn: ValueRef, } struct MethodData { - llfn: ValueRef; - llself: ValueRef; - self_ty: ty::t; - self_mode: ast::rmode; + llfn: ValueRef, + llself: ValueRef, + self_ty: ty::t, + self_mode: ast::rmode } enum CalleeData { @@ -38,8 +38,8 @@ enum CalleeData { } struct Callee { - bcx: block; - data: CalleeData; + bcx: block, + data: CalleeData } fn trans(bcx: block, expr: @ast::expr) -> Callee { diff --git a/src/rustc/middle/trans/closure.rs b/src/rustc/middle/trans/closure.rs index 57fcf66c701..056f432fcd5 100644 --- a/src/rustc/middle/trans/closure.rs +++ b/src/rustc/middle/trans/closure.rs @@ -100,8 +100,8 @@ enum EnvAction { } struct EnvValue { - action: EnvAction; - datum: Datum; + action: EnvAction, + datum: Datum } impl EnvAction { diff --git a/src/rustc/middle/trans/common.rs b/src/rustc/middle/trans/common.rs index dd82707fb27..f4a3af08734 100644 --- a/src/rustc/middle/trans/common.rs +++ b/src/rustc/middle/trans/common.rs @@ -176,9 +176,9 @@ type crate_ctxt = { // Types used for llself. struct ValSelfData { - v: ValueRef; - t: ty::t; - is_owned: bool; + v: ValueRef, + t: ty::t, + is_owned: bool } enum local_val { local_mem(ValueRef), local_imm(ValueRef), } @@ -527,8 +527,8 @@ fn mk_block(llbb: BasicBlockRef, parent: Option<block>, -kind: block_kind, const first_real_arg: uint = 2u; struct Result { - bcx: block; - val: ValueRef; + bcx: block, + val: ValueRef } fn rslt(bcx: block, val: ValueRef) -> Result { diff --git a/src/rustc/middle/trans/datum.rs b/src/rustc/middle/trans/datum.rs index f70284ba547..b45b4e6bdba 100644 --- a/src/rustc/middle/trans/datum.rs +++ b/src/rustc/middle/trans/datum.rs @@ -100,24 +100,24 @@ enum CopyAction { struct Datum { /// The llvm value. This is either a pointer to the Rust value or /// the value itself, depending on `mode` below. - val: ValueRef; + val: ValueRef, /// The rust type of the value. - ty: ty::t; + ty: ty::t, /// Indicates whether this is by-ref or by-value. - mode: DatumMode; + mode: DatumMode, /// How did this value originate? This is particularly important /// if the value is MOVED or prematurely DROPPED, because it /// describes how to cancel the cleanup that was scheduled before. /// See the def'n of the `DatumSource` type. - source: DatumSource; + source: DatumSource } struct DatumBlock { - bcx: block; - datum: Datum; + bcx: block, + datum: Datum, } enum DatumMode { diff --git a/src/rustc/middle/trans/tvec.rs b/src/rustc/middle/trans/tvec.rs index 33072f87db9..7be4f8e645a 100644 --- a/src/rustc/middle/trans/tvec.rs +++ b/src/rustc/middle/trans/tvec.rs @@ -118,10 +118,10 @@ fn make_drop_glue_unboxed(bcx: block, vptr: ValueRef, vec_ty: ty::t) -> } struct VecTypes { - vec_ty: ty::t; - unit_ty: ty::t; - llunit_ty: TypeRef; - llunit_size: ValueRef; + vec_ty: ty::t, + unit_ty: ty::t, + llunit_ty: TypeRef, + llunit_size: ValueRef } impl VecTypes { diff --git a/src/rustc/middle/ty.rs b/src/rustc/middle/ty.rs index 87bd192427a..4c81ccd2142 100644 --- a/src/rustc/middle/ty.rs +++ b/src/rustc/middle/ty.rs @@ -406,10 +406,10 @@ impl fn_proto : cmp::Eq { * - `bounds` is the parameter bounds on the function's upvars. * - `ret_style` indicates whether the function returns a value or fails. */ struct FnMeta { - purity: ast::purity; - proto: fn_proto; - bounds: @~[param_bound]; - ret_style: ret_style; + purity: ast::purity, + proto: fn_proto, + bounds: @~[param_bound], + ret_style: ret_style } /** @@ -419,8 +419,8 @@ struct FnMeta { * - `inputs` is the list of arguments and their modes. * - `output` is the return type. */ struct FnSig { - inputs: ~[arg]; - output: t; + inputs: ~[arg], + output: t } /** @@ -429,8 +429,8 @@ struct FnSig { * by the meta information because, in some cases, the * meta information is inferred. */ struct FnTyBase<M: cmp::Eq> { - meta: M; - sig: FnSig; + meta: M, + sig: FnSig } type FnTy = FnTyBase<FnMeta>; @@ -556,8 +556,8 @@ enum terr_vstore_kind { } struct expected_found<T> { - expected: T; - found: T; + expected: T, + found: T } // Data structures used in type unification diff --git a/src/rustc/middle/typeck/check.rs b/src/rustc/middle/typeck/check.rs index 177fa297237..96d9bf1e2e5 100644 --- a/src/rustc/middle/typeck/check.rs +++ b/src/rustc/middle/typeck/check.rs @@ -97,22 +97,22 @@ type self_info = { /// `bar()` will each have their own `fn_ctxt`, but they will /// share the inherited fields. struct inherited { - infcx: infer::infer_ctxt; - locals: hashmap<ast::node_id, TyVid>; - node_types: hashmap<ast::node_id, ty::t>; - node_type_substs: hashmap<ast::node_id, ty::substs>; - borrowings: hashmap<ast::node_id, ty::borrow>; + infcx: infer::infer_ctxt, + locals: hashmap<ast::node_id, TyVid>, + node_types: hashmap<ast::node_id, ty::t>, + node_type_substs: hashmap<ast::node_id, ty::substs>, + borrowings: hashmap<ast::node_id, ty::borrow>, } struct fn_ctxt { // var_bindings, locals and next_var_id are shared // with any nested functions that capture the environment // (and with any functions whose environment is being captured). - self_impl_def_id: Option<ast::def_id>; - ret_ty: ty::t; + self_impl_def_id: Option<ast::def_id>, + ret_ty: ty::t, // Used by loop bodies that return from the outer function - indirect_ret_ty: Option<ty::t>; - purity: ast::purity; + indirect_ret_ty: Option<ty::t>, + purity: ast::purity, // Sometimes we generate region pointers where the precise region // to use is not known. For example, an expression like `&x.f` @@ -127,13 +127,13 @@ struct fn_ctxt { // inference selects the ultimate value. Finally, borrowck is // charged with guaranteeing that the value whose address was taken // can actually be made to live as long as it needs to live. - mut region_lb: ast::node_id; + mut region_lb: ast::node_id, - in_scope_regions: isr_alist; + in_scope_regions: isr_alist, - inh: @inherited; + inh: @inherited, - ccx: @crate_ctxt; + ccx: @crate_ctxt, } fn blank_inherited(ccx: @crate_ctxt) -> @inherited { diff --git a/src/rustc/middle/typeck/infer.rs b/src/rustc/middle/typeck/infer.rs index 07752df7b45..cbda05a4012 100644 --- a/src/rustc/middle/typeck/infer.rs +++ b/src/rustc/middle/typeck/infer.rs @@ -507,9 +507,9 @@ fn rollback_to<V:copy vid, T:copy>( } struct Snapshot { - ty_var_bindings_len: uint; - int_var_bindings_len: uint; - region_vars_snapshot: uint; + ty_var_bindings_len: uint, + int_var_bindings_len: uint, + region_vars_snapshot: uint, } impl infer_ctxt { diff --git a/src/rustc/middle/typeck/infer/combine.rs b/src/rustc/middle/typeck/infer/combine.rs index 8199d7058ff..2bfabd807a2 100644 --- a/src/rustc/middle/typeck/infer/combine.rs +++ b/src/rustc/middle/typeck/infer/combine.rs @@ -79,9 +79,9 @@ trait combine { } struct combine_fields { - infcx: infer_ctxt; - a_is_expected: bool; - span: span; + infcx: infer_ctxt, + a_is_expected: bool, + span: span, } fn expected_found<C: combine,T>( diff --git a/src/rustc/middle/typeck/infer/region_var_bindings.rs b/src/rustc/middle/typeck/infer/region_var_bindings.rs index 96d0cf9c110..be87558ee5b 100644 --- a/src/rustc/middle/typeck/infer/region_var_bindings.rs +++ b/src/rustc/middle/typeck/infer/region_var_bindings.rs @@ -350,8 +350,8 @@ impl Constraint: cmp::Eq { } struct TwoRegions { - a: region; - b: region; + a: region, + b: region, } impl TwoRegions: cmp::Eq { @@ -371,12 +371,12 @@ enum UndoLogEntry { type CombineMap = hashmap<TwoRegions, RegionVid>; struct RegionVarBindings { - tcx: ty::ctxt; - var_spans: DVec<span>; - values: Cell<~[ty::region]>; - constraints: hashmap<Constraint, span>; - lubs: CombineMap; - glbs: CombineMap; + tcx: ty::ctxt, + var_spans: DVec<span>, + values: Cell<~[ty::region]>, + constraints: hashmap<Constraint, span>, + lubs: CombineMap, + glbs: CombineMap, // The undo log records actions that might later be undone. // @@ -386,7 +386,7 @@ struct RegionVarBindings { // actively snapshotting. The reason for this is that otherwise // we end up adding entries for things like the lower bound on // a variable and so forth, which can never be rolled back. - undo_log: DVec<UndoLogEntry>; + undo_log: DVec<UndoLogEntry> } fn RegionVarBindings(tcx: ty::ctxt) -> RegionVarBindings { @@ -770,26 +770,26 @@ impl Classification : cmp::Eq { enum GraphNodeValue { NoValue, Value(region), ErrorValue } struct GraphNode { - span: span; - mut classification: Classification; - mut value: GraphNodeValue; - head_edge: [mut uint * 2]; // FIXME(#3226)--should not need mut + span: span, + mut classification: Classification, + mut value: GraphNodeValue, + head_edge: [mut uint * 2], // FIXME(#3226)--should not need mut } struct GraphEdge { - next_edge: [mut uint * 2]; // FIXME(#3226)--should not need mut - constraint: Constraint; - span: span; + next_edge: [mut uint * 2], // FIXME(#3226)--should not need mut + constraint: Constraint, + span: span, } struct Graph { - nodes: ~[GraphNode]; - edges: ~[GraphEdge]; + nodes: ~[GraphNode], + edges: ~[GraphEdge], } struct SpannedRegion { - region: region; - span: span; + region: region, + span: span, } type TwoRegionsMap = hashmap<TwoRegions, ()>; diff --git a/src/rustc/middle/typeck/infer/unify.rs b/src/rustc/middle/typeck/infer/unify.rs index 65cbcdcb40a..36c3093874a 100644 --- a/src/rustc/middle/typeck/infer/unify.rs +++ b/src/rustc/middle/typeck/infer/unify.rs @@ -9,14 +9,14 @@ enum var_value<V:copy, T:copy> { } struct vals_and_bindings<V:copy, T:copy> { - vals: SmallIntMap<var_value<V, T>>; - mut bindings: ~[(V, var_value<V, T>)]; + vals: SmallIntMap<var_value<V, T>>, + mut bindings: ~[(V, var_value<V, T>)], } struct node<V:copy, T:copy> { - root: V; - possible_types: T; - rank: uint; + root: V, + possible_types: T, + rank: uint, } impl infer_ctxt { diff --git a/src/rustc/middle/typeck/rscope.rs b/src/rustc/middle/typeck/rscope.rs index 32864a2d51f..3826d3e527c 100644 --- a/src/rustc/middle/typeck/rscope.rs +++ b/src/rustc/middle/typeck/rscope.rs @@ -60,8 +60,8 @@ impl @anon_rscope: region_scope { } struct binding_rscope { - base: region_scope; - mut anon_bindings: uint; + base: region_scope, + mut anon_bindings: uint, } fn in_binding_rscope<RS: region_scope copy owned>(self: RS) -> @binding_rscope { diff --git a/src/test/bench/core-map.rs b/src/test/bench/core-map.rs index c7e70a8416f..4901a85369a 100644 --- a/src/test/bench/core-map.rs +++ b/src/test/bench/core-map.rs @@ -11,13 +11,13 @@ use send_map::linear::*; use io::WriterUtil; struct Results { - sequential_ints: float; - random_ints: float; - delete_ints: float; + sequential_ints: float, + random_ints: float, + delete_ints: float, - sequential_strings: float; - random_strings: float; - delete_strings: float; + sequential_strings: float, + random_strings: float, + delete_strings: float } fn timed(result: &mut float, diff --git a/src/test/bench/shootout-mandelbrot.rs b/src/test/bench/shootout-mandelbrot.rs index 161c893fab7..879825fa0ae 100644 --- a/src/test/bench/shootout-mandelbrot.rs +++ b/src/test/bench/shootout-mandelbrot.rs @@ -17,8 +17,8 @@ use io::WriterUtil; use std::map::hashmap; struct cmplx { - re: f64; - im: f64; + re: f64, + im: f64 } impl cmplx : ops::Mul<cmplx,cmplx> { diff --git a/src/test/compile-fail/auto-ref-borrowck-failure.rs b/src/test/compile-fail/auto-ref-borrowck-failure.rs index 316f3797196..72c7a2f2585 100644 --- a/src/test/compile-fail/auto-ref-borrowck-failure.rs +++ b/src/test/compile-fail/auto-ref-borrowck-failure.rs @@ -1,7 +1,7 @@ // Tests that auto-ref can't create mutable aliases to immutable memory. struct Foo { - x: int; + x: int } trait Stuff { diff --git a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-1.rs b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-1.rs index e6c65d22b40..8a518edf736 100644 --- a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-1.rs +++ b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-1.rs @@ -1,4 +1,4 @@ -struct X { x: (); drop { error!("destructor runs"); } } +struct X { x: (), drop { error!("destructor runs"); } } fn main() { let x = Some(X { x: () }); diff --git a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-2.rs b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-2.rs index e8ef5050a65..b99d4197848 100644 --- a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-2.rs +++ b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-2.rs @@ -1,4 +1,4 @@ -struct X { x: (); drop { error!("destructor runs"); } } +struct X { x: (), drop { error!("destructor runs"); } } fn main() { let x = Some((X { x: () }, X { x: () })); diff --git a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-3.rs b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-3.rs index 399e8702b90..496ec09513b 100644 --- a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-3.rs +++ b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-3.rs @@ -1,4 +1,4 @@ -struct X { x: (); drop { error!("destructor runs"); } } +struct X { x: (), drop { error!("destructor runs"); } } enum double_option<T,U> { some2(T,U), none2 } diff --git a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-4.rs b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-4.rs index 71f4934effd..93096751d5c 100644 --- a/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-4.rs +++ b/src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-4.rs @@ -1,4 +1,4 @@ -struct X { x: (); drop { error!("destructor runs"); } } +struct X { x: (), drop { error!("destructor runs"); } } fn main() { let x = Some((X { x: () }, X { x: () })); diff --git a/src/test/compile-fail/bind-by-move-no-lvalues-1.rs b/src/test/compile-fail/bind-by-move-no-lvalues-1.rs index c52848efc45..8e881d1d429 100644 --- a/src/test/compile-fail/bind-by-move-no-lvalues-1.rs +++ b/src/test/compile-fail/bind-by-move-no-lvalues-1.rs @@ -1,4 +1,4 @@ -struct X { x: (); drop { error!("destructor runs"); } } +struct X { x: (), drop { error!("destructor runs"); } } fn main() { let x = Some(X { x: () }); diff --git a/src/test/compile-fail/bind-by-move-no-lvalues-2.rs b/src/test/compile-fail/bind-by-move-no-lvalues-2.rs index bd85086dfb0..f65f5f0de61 100644 --- a/src/test/compile-fail/bind-by-move-no-lvalues-2.rs +++ b/src/test/compile-fail/bind-by-move-no-lvalues-2.rs @@ -1,5 +1,5 @@ -struct X { x: (); drop { error!("destructor runs"); } } -struct Y { y: Option<X>; } +struct X { x: (), drop { error!("destructor runs"); } } +struct Y { y: Option<X> } fn main() { let x = Y { y: Some(X { x: () }) }; diff --git a/src/test/compile-fail/bind-by-move-no-sub-bindings.rs b/src/test/compile-fail/bind-by-move-no-sub-bindings.rs index 10db76f5fd8..1a511ccef53 100644 --- a/src/test/compile-fail/bind-by-move-no-sub-bindings.rs +++ b/src/test/compile-fail/bind-by-move-no-sub-bindings.rs @@ -1,4 +1,4 @@ -struct X { x: (); drop { error!("destructor runs"); } } +struct X { x: (), drop { error!("destructor runs"); } } fn main() { let x = Some(X { x: () }); diff --git a/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs b/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs index e643cd4ceaa..f539045108e 100644 --- a/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs +++ b/src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs @@ -1,5 +1,5 @@ struct defer { - x: &[&str]; + x: &[&str], drop { #error["%?", self.x]; } } diff --git a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs index dcaa53d37fc..849eefa124e 100644 --- a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs +++ b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs @@ -1,6 +1,6 @@ struct Point { - x: int; - y: int; + x: int, + y: int, } impl Point : ops::Add<int,int> { diff --git a/src/test/compile-fail/borrowck-unary-move-2.rs b/src/test/compile-fail/borrowck-unary-move-2.rs index b0a49db488a..303415e4663 100644 --- a/src/test/compile-fail/borrowck-unary-move-2.rs +++ b/src/test/compile-fail/borrowck-unary-move-2.rs @@ -1,5 +1,5 @@ struct noncopyable { - i: (); drop { #error["dropped"]; } + i: (), drop { #error["dropped"]; } } fn noncopyable() -> noncopyable { diff --git a/src/test/compile-fail/disallowed-deconstructing-destructing-struct.rs b/src/test/compile-fail/disallowed-deconstructing-destructing-struct.rs index 957d1c52e19..0ee8bf0c7c7 100644 --- a/src/test/compile-fail/disallowed-deconstructing-destructing-struct.rs +++ b/src/test/compile-fail/disallowed-deconstructing-destructing-struct.rs @@ -1,5 +1,5 @@ struct X { - x: ~str; + x: ~str, drop { error!("value: %s", self.x); } diff --git a/src/test/compile-fail/issue-2356.rs b/src/test/compile-fail/issue-2356.rs index a8a5a94cebe..d0c265eb4ee 100644 --- a/src/test/compile-fail/issue-2356.rs +++ b/src/test/compile-fail/issue-2356.rs @@ -1,4 +1,4 @@ struct cat { - tail: int; + tail: int, fn meow() { tail += 1; } //~ ERROR: Did you mean: `self.tail` } diff --git a/src/test/compile-fail/issue-2548.rs b/src/test/compile-fail/issue-2548.rs index 091707065dc..61cfabc40d2 100644 --- a/src/test/compile-fail/issue-2548.rs +++ b/src/test/compile-fail/issue-2548.rs @@ -1,7 +1,7 @@ // A test case for #2548. struct foo { - x: @mut int; + x: @mut int, drop { diff --git a/src/test/compile-fail/issue-2587-2.rs b/src/test/compile-fail/issue-2587-2.rs index 47d7f2abf5f..db8d8f9fb7b 100644 --- a/src/test/compile-fail/issue-2587-2.rs +++ b/src/test/compile-fail/issue-2587-2.rs @@ -3,7 +3,7 @@ fn foo<T: copy>(+_t: T) { fail; } fn bar<T>(+_t: T) { fail; } struct S { - x: int; + x: int, drop {} } diff --git a/src/test/compile-fail/issue-2611-3.rs b/src/test/compile-fail/issue-2611-3.rs index 172fb81d3bb..9a042fd1d0b 100644 --- a/src/test/compile-fail/issue-2611-3.rs +++ b/src/test/compile-fail/issue-2611-3.rs @@ -11,7 +11,7 @@ trait A { } struct E { - f: int; + f: int } impl E: A { diff --git a/src/test/compile-fail/issue-2611-4.rs b/src/test/compile-fail/issue-2611-4.rs index 95f5685d84f..977cce73808 100644 --- a/src/test/compile-fail/issue-2611-4.rs +++ b/src/test/compile-fail/issue-2611-4.rs @@ -8,7 +8,7 @@ trait A { } struct E { - f: int; + f: int } impl E: A { diff --git a/src/test/compile-fail/issue-2611-5.rs b/src/test/compile-fail/issue-2611-5.rs index 4278dcb2fb6..99afe776f86 100644 --- a/src/test/compile-fail/issue-2611-5.rs +++ b/src/test/compile-fail/issue-2611-5.rs @@ -8,7 +8,7 @@ trait A { } struct E { - f: int; + f: int } impl E: A { diff --git a/src/test/compile-fail/lint-non-camel-case-struct.rs b/src/test/compile-fail/lint-non-camel-case-struct.rs index a715c73a497..c8895f2b43c 100644 --- a/src/test/compile-fail/lint-non-camel-case-struct.rs +++ b/src/test/compile-fail/lint-non-camel-case-struct.rs @@ -1,6 +1,6 @@ #[forbid(non_camel_case_types)] struct foo { //~ ERROR type, variant, or trait must be camel case - bar: int; + bar: int } fn main() { diff --git a/src/test/compile-fail/private-struct-field.rs b/src/test/compile-fail/private-struct-field.rs index becef52fa61..5dffdfa4fd1 100644 --- a/src/test/compile-fail/private-struct-field.rs +++ b/src/test/compile-fail/private-struct-field.rs @@ -1,6 +1,6 @@ mod cat { struct Cat { - priv meows: uint; + priv meows: uint } fn new_cat() -> Cat { diff --git a/src/test/compile-fail/regions-glb-free-free.rs b/src/test/compile-fail/regions-glb-free-free.rs index 881e975d75f..4e35380623d 100644 --- a/src/test/compile-fail/regions-glb-free-free.rs +++ b/src/test/compile-fail/regions-glb-free-free.rs @@ -5,10 +5,10 @@ mod argparse { import either::{Either, Left, Right}; struct Flag { - name: &str; - desc: &str; - max_count: uint; - mut value: uint; + name: &str, + desc: &str, + max_count: uint, + mut value: uint } fn flag(name: &r/str, desc: &r/str) -> Flag/&r { diff --git a/src/test/compile-fail/regions-infer-at-fn-not-param.rs b/src/test/compile-fail/regions-infer-at-fn-not-param.rs index 385372f5c43..2c860334165 100644 --- a/src/test/compile-fail/regions-infer-at-fn-not-param.rs +++ b/src/test/compile-fail/regions-infer-at-fn-not-param.rs @@ -1,17 +1,17 @@ struct param1 { - g: &fn(); + g: &fn() } struct param2 { - g: fn(); + g: fn() } struct not_param1 { - g: @fn(); + g: @fn() } struct not_param2 { - g: @fn(); + g: @fn() } fn take1(p: param1) -> param1 { p } //~ ERROR mismatched types diff --git a/src/test/compile-fail/regions-infer-contravariance-due-to-immutability.rs b/src/test/compile-fail/regions-infer-contravariance-due-to-immutability.rs index 07d456d3188..75fa75520fc 100644 --- a/src/test/compile-fail/regions-infer-contravariance-due-to-immutability.rs +++ b/src/test/compile-fail/regions-infer-contravariance-due-to-immutability.rs @@ -1,5 +1,5 @@ struct contravariant { - f: ∫ + f: &int } fn to_same_lifetime(bi: contravariant/&r) { diff --git a/src/test/compile-fail/regions-infer-contravariance-due-to-ret.rs b/src/test/compile-fail/regions-infer-contravariance-due-to-ret.rs index 970350748d5..d71f3334254 100644 --- a/src/test/compile-fail/regions-infer-contravariance-due-to-ret.rs +++ b/src/test/compile-fail/regions-infer-contravariance-due-to-ret.rs @@ -4,7 +4,7 @@ // the normal case. struct contravariant { - f: fn@() -> &self/int; + f: fn@() -> &self/int } fn to_same_lifetime(bi: contravariant/&r) { diff --git a/src/test/compile-fail/regions-infer-covariance-due-to-arg.rs b/src/test/compile-fail/regions-infer-covariance-due-to-arg.rs index a2a0d131760..45a57fc222d 100644 --- a/src/test/compile-fail/regions-infer-covariance-due-to-arg.rs +++ b/src/test/compile-fail/regions-infer-covariance-due-to-arg.rs @@ -3,7 +3,7 @@ // You can upcast to a *larger region* but not a smaller one. struct covariant { - f: fn@(x: &self/int) -> int; + f: fn@(x: &self/int) -> int } fn to_same_lifetime(bi: covariant/&r) { diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-arg-and-ret.rs b/src/test/compile-fail/regions-infer-invariance-due-to-arg-and-ret.rs index d7ed0ed1d76..43e08a1d966 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-arg-and-ret.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-arg-and-ret.rs @@ -3,7 +3,7 @@ // You cannot convert between regions. struct invariant { - f: fn(x: &self/int) -> &self/int; + f: fn(x: &self/int) -> &self/int } fn to_same_lifetime(bi: invariant/&r) { diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-1.rs b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-1.rs index 0b0a8bb7448..85ade7bebb8 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-1.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-1.rs @@ -1,5 +1,5 @@ struct invariant { - f: @mut ∫ + f: @mut &int } fn to_same_lifetime(bi: invariant/&r) { diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-2.rs b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-2.rs index cad76bb6380..0d9365ceae9 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-2.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-2.rs @@ -1,5 +1,5 @@ struct invariant { - f: @[mut &int]; + f: @[mut &int] } fn to_same_lifetime(bi: invariant/&r) { diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs index 0f8441110f1..61f45e5d475 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs @@ -1,5 +1,5 @@ struct invariant { - f: fn@(x: @mut &self/int); + f: fn@(x: @mut &self/int) } fn to_same_lifetime(bi: invariant/&r) { diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs index e39293ddcb1..773e999b4b0 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs @@ -1,5 +1,5 @@ struct invariant { - f: fn@() -> @mut &self/int; + f: fn@() -> @mut &self/int } fn to_same_lifetime(bi: invariant/&r) { diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-mutability.rs b/src/test/compile-fail/regions-infer-invariance-due-to-mutability.rs index f00888add68..9779bdf156c 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-mutability.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-mutability.rs @@ -1,5 +1,5 @@ struct invariant { - mut f: ∫ + mut f: &int } fn to_same_lifetime(bi: invariant/&r) { diff --git a/src/test/compile-fail/regions-infer-not-param.rs b/src/test/compile-fail/regions-infer-not-param.rs index bc2b0746938..2a9c45f2492 100644 --- a/src/test/compile-fail/regions-infer-not-param.rs +++ b/src/test/compile-fail/regions-infer-not-param.rs @@ -1,17 +1,17 @@ struct direct { - f: ∫ + f: &int } struct indirect1 { - g: fn@(direct); + g: fn@(direct) } struct indirect2 { - g: fn@(direct/&); + g: fn@(direct/&) } struct indirect3 { - g: fn@(direct/&self); + g: fn@(direct/&self) } fn take_direct(p: direct) -> direct { p } //~ ERROR mismatched types diff --git a/src/test/compile-fail/regions-steal-closure.rs b/src/test/compile-fail/regions-steal-closure.rs index f0c5124630a..668d11f03b1 100644 --- a/src/test/compile-fail/regions-steal-closure.rs +++ b/src/test/compile-fail/regions-steal-closure.rs @@ -1,5 +1,5 @@ struct closure_box { - cl: &fn(); + cl: &fn() } fn box_it(x: &r/fn()) -> closure_box/&r { diff --git a/src/test/compile-fail/repeat-to-run-dtor-twice.rs b/src/test/compile-fail/repeat-to-run-dtor-twice.rs index fbfd6e65cb3..a028e7c1e37 100644 --- a/src/test/compile-fail/repeat-to-run-dtor-twice.rs +++ b/src/test/compile-fail/repeat-to-run-dtor-twice.rs @@ -2,7 +2,7 @@ // literal syntax. struct Foo { - x: int; + x: int, drop { io::println("Goodbye!"); diff --git a/src/test/run-pass/auto-ref.rs b/src/test/run-pass/auto-ref.rs index e5d4d106b53..bad85d9b9c9 100644 --- a/src/test/run-pass/auto-ref.rs +++ b/src/test/run-pass/auto-ref.rs @@ -1,5 +1,5 @@ struct Foo { - x: int; + x: int, } trait Stuff { diff --git a/src/test/run-pass/autoderef-and-borrow-method-receiver.rs b/src/test/run-pass/autoderef-and-borrow-method-receiver.rs index d8cdb109b6d..3a47a47aad6 100644 --- a/src/test/run-pass/autoderef-and-borrow-method-receiver.rs +++ b/src/test/run-pass/autoderef-and-borrow-method-receiver.rs @@ -1,5 +1,5 @@ struct Foo { - x: int; + x: int, } impl Foo { diff --git a/src/test/run-pass/common-fields-trivial.rs b/src/test/run-pass/common-fields-trivial.rs index c4feb893c10..96791a20f0d 100644 --- a/src/test/run-pass/common-fields-trivial.rs +++ b/src/test/run-pass/common-fields-trivial.rs @@ -1,7 +1,7 @@ enum Foo { struct { - x: int; - y: int; + x: int, + y: int, } Bar(int), diff --git a/src/test/run-pass/const-struct.rs b/src/test/run-pass/const-struct.rs index 653150e68f7..457c80e38a2 100644 --- a/src/test/run-pass/const-struct.rs +++ b/src/test/run-pass/const-struct.rs @@ -1,5 +1,5 @@ -struct foo { a: int; b: int; c: int; } +struct foo { a: int, b: int, c: int } impl foo : cmp::Eq { pure fn eq(&&other: foo) -> bool { diff --git a/src/test/run-pass/explicit-self-closures.rs b/src/test/run-pass/explicit-self-closures.rs index b1f447d6648..3fd9826a392 100644 --- a/src/test/run-pass/explicit-self-closures.rs +++ b/src/test/run-pass/explicit-self-closures.rs @@ -1,7 +1,7 @@ // Test to make sure that explicit self params work inside closures struct Box { - x: uint; + x: uint } impl Box { diff --git a/src/test/run-pass/explicit-self.rs b/src/test/run-pass/explicit-self.rs index 8872abe1b21..f72005a54f0 100644 --- a/src/test/run-pass/explicit-self.rs +++ b/src/test/run-pass/explicit-self.rs @@ -33,7 +33,7 @@ fn select_based_on_unit_circle<T>( struct thing { - x: {mut a: @int}; + x: {mut a: @int} } fn thing(x: {mut a: @int}) -> thing { diff --git a/src/test/run-pass/functional-struct-update.rs b/src/test/run-pass/functional-struct-update.rs index c6e885a2911..ce6198c8d24 100644 --- a/src/test/run-pass/functional-struct-update.rs +++ b/src/test/run-pass/functional-struct-update.rs @@ -1,6 +1,6 @@ struct Foo { - x: int; - y: int; + x: int, + y: int } fn main() { diff --git a/src/test/run-pass/issue-2936.rs b/src/test/run-pass/issue-2936.rs index ddcc0360d8b..e76a3088f81 100644 --- a/src/test/run-pass/issue-2936.rs +++ b/src/test/run-pass/issue-2936.rs @@ -7,7 +7,7 @@ fn foo<T, U: bar<T>>(b: U) -> T { } struct cbar : bar<int> { - x: int; + x: int, fn get_bar() -> int { self.x } diff --git a/src/test/run-pass/issue-3220.rs b/src/test/run-pass/issue-3220.rs index 358f0a82a6e..eb3eddd2681 100644 --- a/src/test/run-pass/issue-3220.rs +++ b/src/test/run-pass/issue-3220.rs @@ -1,4 +1,4 @@ -struct thing { x: int; drop { } } +struct thing { x: int, drop { } } fn thing() -> thing { thing { x: 0 diff --git a/src/test/run-pass/max-min-classes.rs b/src/test/run-pass/max-min-classes.rs index 20621902173..20096d7f6b7 100644 --- a/src/test/run-pass/max-min-classes.rs +++ b/src/test/run-pass/max-min-classes.rs @@ -3,8 +3,8 @@ trait Product { } struct Foo { - x: int; - y: int; + x: int, + y: int, } impl Foo { diff --git a/src/test/run-pass/operator-overloading.rs b/src/test/run-pass/operator-overloading.rs index 37e249b6cf0..79eef40bfeb 100644 --- a/src/test/run-pass/operator-overloading.rs +++ b/src/test/run-pass/operator-overloading.rs @@ -1,6 +1,6 @@ struct Point { - x: int; - y: int; + x: int, + y: int } impl Point : ops::Add<Point,Point> { diff --git a/src/test/run-pass/option-unwrap.rs b/src/test/run-pass/option-unwrap.rs index fe45e8f91ee..06b87794e59 100644 --- a/src/test/run-pass/option-unwrap.rs +++ b/src/test/run-pass/option-unwrap.rs @@ -1,5 +1,5 @@ struct dtor { - x: @mut int; + x: @mut int, drop { // abuse access to shared mutable state to write this code diff --git a/src/test/run-pass/pipe-presentation-examples.rs b/src/test/run-pass/pipe-presentation-examples.rs index cf34c44d500..f485148d79e 100644 --- a/src/test/run-pass/pipe-presentation-examples.rs +++ b/src/test/run-pass/pipe-presentation-examples.rs @@ -65,7 +65,7 @@ macro_rules! select ( // Types and protocols struct Buffer { - foo: (); + foo: (), drop { } } diff --git a/src/test/run-pass/regions-copy-closure.rs b/src/test/run-pass/regions-copy-closure.rs index 35c7930d729..2e03c5f82c4 100644 --- a/src/test/run-pass/regions-copy-closure.rs +++ b/src/test/run-pass/regions-copy-closure.rs @@ -1,5 +1,5 @@ struct closure_box { - cl: &fn(); + cl: &fn(), } fn box_it(x: &r/fn()) -> closure_box/&r { diff --git a/src/test/run-pass/regions-infer-contravariance-due-to-ret.rs b/src/test/run-pass/regions-infer-contravariance-due-to-ret.rs index e6b00890fab..17366224e29 100644 --- a/src/test/run-pass/regions-infer-contravariance-due-to-ret.rs +++ b/src/test/run-pass/regions-infer-contravariance-due-to-ret.rs @@ -1,5 +1,5 @@ struct boxed_int { - f: ∫ + f: &int, } fn max(bi: &r/boxed_int, f: &r/int) -> int { diff --git a/src/test/run-pass/regions-infer-contravariance.rs b/src/test/run-pass/regions-infer-contravariance.rs index 00075563750..22e37816624 100644 --- a/src/test/run-pass/regions-infer-contravariance.rs +++ b/src/test/run-pass/regions-infer-contravariance.rs @@ -1,5 +1,5 @@ struct boxed_int { - f: ∫ + f: &int, } fn get(bi: &r/boxed_int) -> &r/int { diff --git a/src/test/run-pass/regions-static-closure.rs b/src/test/run-pass/regions-static-closure.rs index e45952f8651..61e04c4e776 100644 --- a/src/test/run-pass/regions-static-closure.rs +++ b/src/test/run-pass/regions-static-closure.rs @@ -1,5 +1,5 @@ struct closure_box { - cl: &fn(); + cl: &fn(), } fn box_it(x: &r/fn()) -> closure_box/&r { diff --git a/src/test/run-pass/struct-literal-dtor.rs b/src/test/run-pass/struct-literal-dtor.rs index fdece230ef8..e182fa67cf0 100644 --- a/src/test/run-pass/struct-literal-dtor.rs +++ b/src/test/run-pass/struct-literal-dtor.rs @@ -1,5 +1,5 @@ struct foo { - x: ~str; + x: ~str, drop { #error["%s", self.x]; } } diff --git a/src/test/run-pass/struct-pattern-matching.rs b/src/test/run-pass/struct-pattern-matching.rs index 0a4f3b933c0..e5e26d0b442 100644 --- a/src/test/run-pass/struct-pattern-matching.rs +++ b/src/test/run-pass/struct-pattern-matching.rs @@ -1,6 +1,6 @@ struct Foo { - x: int; - y: int; + x: int, + y: int, } fn main() { diff --git a/src/test/run-pass/variant-structs-trivial.rs b/src/test/run-pass/variant-structs-trivial.rs index c8c6a88ddf2..3b6091056f7 100644 --- a/src/test/run-pass/variant-structs-trivial.rs +++ b/src/test/run-pass/variant-structs-trivial.rs @@ -1,6 +1,6 @@ enum Foo { - Bar { x: int; }, - Baz { y: int; } + Bar { x: int }, + Baz { y: int } } fn main() { } |
