about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-09-06 19:40:15 -0700
committerBrian Anderson <banderson@mozilla.com>2012-09-07 14:02:33 -0700
commit2572e8035522bd2002fab4ef777ad0290312ac71 (patch)
treeab5750fd1c01aaf9db992ab807b9cbb8a88dec3e /src/libcore
parent14303bad89a049b5ca54ad49b4f4ccff7a06b85f (diff)
Remove 'let' syntax for struct fields
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/comm.rs4
-rw-r--r--src/libcore/gc.rs6
-rw-r--r--src/libcore/io.rs6
-rw-r--r--src/libcore/option.rs2
-rw-r--r--src/libcore/pipes.rs20
-rw-r--r--src/libcore/priv.rs2
-rw-r--r--src/libcore/rand.rs2
-rw-r--r--src/libcore/run.rs2
-rw-r--r--src/libcore/stackwalk.rs2
-rw-r--r--src/libcore/task.rs20
-rw-r--r--src/libcore/unsafe.rs4
11 files changed, 35 insertions, 35 deletions
diff --git a/src/libcore/comm.rs b/src/libcore/comm.rs
index cf146ad8aa0..f9d68975944 100644
--- a/src/libcore/comm.rs
+++ b/src/libcore/comm.rs
@@ -98,7 +98,7 @@ fn listen<T: send, U>(f: fn(Chan<T>) -> U) -> U {
 }
 
 struct PortPtr<T:send> {
-  let po: *rust_port;
+    po: *rust_port,
   drop unsafe {
       do task::unkillable {
         // Once the port is detached it's guaranteed not to receive further
@@ -138,7 +138,7 @@ fn PortPtr<T: send>(po: *rust_port) -> PortPtr<T> {
 fn as_raw_port<T: send, U>(ch: comm::Chan<T>, f: fn(*rust_port) -> U) -> U {
 
     struct PortRef {
-       let p: *rust_port;
+        p: *rust_port,
        drop {
          if !ptr::is_null(self.p) {
            rustrt::rust_port_drop(self.p);
diff --git a/src/libcore/gc.rs b/src/libcore/gc.rs
index d99fc631bef..d12062f827a 100644
--- a/src/libcore/gc.rs
+++ b/src/libcore/gc.rs
@@ -36,9 +36,9 @@ export cleanup_stack_for_failure;
 
 // Mirrors rust_stack.h stk_seg
 struct StackSegment {
-    let prev: *StackSegment;
-    let next: *StackSegment;
-    let end: uintptr_t;
+    prev: *StackSegment,
+    next: *StackSegment,
+    end: uintptr_t,
     // And other fields which we don't care about...
 }
 
diff --git a/src/libcore/io.rs b/src/libcore/io.rs
index a9d83194713..d16abb26ae3 100644
--- a/src/libcore/io.rs
+++ b/src/libcore/io.rs
@@ -246,7 +246,7 @@ impl<T: Reader, C> {base: T, cleanup: C}: Reader {
 }
 
 struct FILERes {
-    let f: *libc::FILE;
+    f: *libc::FILE,
     drop { libc::fclose(self.f); }
 }
 
@@ -422,7 +422,7 @@ impl fd_t: Writer {
 }
 
 struct FdRes {
-    let fd: fd_t;
+    fd: fd_t,
     drop { libc::close(self.fd); }
 }
 
@@ -778,7 +778,7 @@ mod fsync {
 
     // Artifacts that need to fsync on destruction
     struct Res<t> {
-        let arg: Arg<t>;
+        arg: Arg<t>,
         drop {
           match self.arg.opt_level {
             option::None => (),
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index 4c4e0048f17..5b7aee4d74c 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -292,7 +292,7 @@ fn test_unwrap_str() {
 #[test]
 fn test_unwrap_resource() {
     struct R {
-       let i: @mut int;
+       i: @mut int,
        drop { *(self.i) += 1; }
     }
 
diff --git a/src/libcore/pipes.rs b/src/libcore/pipes.rs
index 2078b1ed71b..f74e4bca40c 100644
--- a/src/libcore/pipes.rs
+++ b/src/libcore/pipes.rs
@@ -134,7 +134,7 @@ impl State: Eq {
 struct BufferHeader {
     // Tracks whether this buffer needs to be freed. We can probably
     // get away with restricting it to 0 or 1, if we're careful.
-    let mut ref_count: int;
+    mut ref_count: int,
 
     // We may want a drop, and to be careful about stringing this
     // thing along.
@@ -158,12 +158,12 @@ type Buffer<T: send> = {
 };
 
 struct PacketHeader {
-    let mut state: State;
-    let mut blocked_task: *rust_task;
+    mut state: State,
+    mut blocked_task: *rust_task,
 
     // This is a reinterpret_cast of a ~buffer, that can also be cast
     // to a buffer_header if need be.
-    let mut buffer: *libc::c_void;
+    mut buffer: *libc::c_void,
 
     // Returns the old state.
     unsafe fn mark_blocked(this: *rust_task) -> State {
@@ -374,7 +374,7 @@ unsafe fn get_buffer<T: send>(p: *PacketHeader) -> ~Buffer<T> {
 
 // This could probably be done with SharedMutableState to avoid move_it!().
 struct BufferResource<T: send> {
-    let buffer: ~Buffer<T>;
+    buffer: ~Buffer<T>,
 
     drop unsafe {
         let b = move_it!(self.buffer);
@@ -779,8 +779,8 @@ fn send_packet<T: send>(p: *packet<T>) -> SendPacket<T> {
 }
 
 struct SendPacketBuffered<T: send, Tbuffer: send> {
-    let mut p: Option<*Packet<T>>;
-    let mut buffer: Option<BufferResource<Tbuffer>>;
+    mut p: Option<*Packet<T>>,
+    mut buffer: Option<BufferResource<Tbuffer>>,
     drop {
         //if self.p != none {
         //    debug!("drop send %?", option::get(self.p));
@@ -860,8 +860,8 @@ fn recv_packet<T: send>(p: *packet<T>) -> RecvPacket<T> {
 }
 
 struct RecvPacketBuffered<T: send, Tbuffer: send> : Selectable {
-    let mut p: Option<*Packet<T>>;
-    let mut buffer: Option<BufferResource<Tbuffer>>;
+    mut p: Option<*Packet<T>>,
+    mut buffer: Option<BufferResource<Tbuffer>>,
     drop {
         //if self.p != none {
         //    debug!("drop recv %?", option::get(self.p));
@@ -1098,7 +1098,7 @@ impl<T: send> Port<T>: Recv<T> {
 
 /// Treat many ports as one.
 struct PortSet<T: send> : Recv<T> {
-    let mut ports: ~[pipes::Port<T>];
+    mut ports: ~[pipes::Port<T>],
 
     fn add(+port: pipes::Port<T>) {
         vec::push(self.ports, port)
diff --git a/src/libcore/priv.rs b/src/libcore/priv.rs
index ae82e59efad..9330d376cad 100644
--- a/src/libcore/priv.rs
+++ b/src/libcore/priv.rs
@@ -195,7 +195,7 @@ unsafe fn weaken_task(f: fn(comm::Port<()>)) {
     f(po);
 
     struct Unweaken {
-      let ch: comm::Chan<()>;
+      ch: comm::Chan<()>,
       drop unsafe {
         rustrt::rust_task_unweaken(unsafe::reinterpret_cast(&self.ch));
       }
diff --git a/src/libcore/rand.rs b/src/libcore/rand.rs
index cdead813899..35135b1fd23 100644
--- a/src/libcore/rand.rs
+++ b/src/libcore/rand.rs
@@ -244,7 +244,7 @@ impl Rng {
 }
 
 struct RandRes {
-    let c: *rctx;
+    c: *rctx,
     drop { rustrt::rand_free(self.c); }
 }
 
diff --git a/src/libcore/run.rs b/src/libcore/run.rs
index 866fcb2275a..c1dc656c69f 100644
--- a/src/libcore/run.rs
+++ b/src/libcore/run.rs
@@ -227,7 +227,7 @@ fn start_program(prog: &str, args: &[~str]) -> Program {
        libc::fclose(r.err_file);
     }
     struct ProgRes {
-        let r: ProgRepr;
+        r: ProgRepr,
         drop { destroy_repr(&self.r); }
     }
 
diff --git a/src/libcore/stackwalk.rs b/src/libcore/stackwalk.rs
index 0f79a5b6f5f..6248fa46ff8 100644
--- a/src/libcore/stackwalk.rs
+++ b/src/libcore/stackwalk.rs
@@ -7,7 +7,7 @@ use sys::size_of;
 type Word = uint;
 
 struct Frame {
-    let fp: *Word;
+    fp: *Word
 }
 
 fn Frame(fp: *Word) -> Frame {
diff --git a/src/libcore/task.rs b/src/libcore/task.rs
index f4514ecd367..6db50291b95 100644
--- a/src/libcore/task.rs
+++ b/src/libcore/task.rs
@@ -610,7 +610,7 @@ fn get_task() -> Task {
  */
 unsafe fn unkillable<U>(f: fn() -> U) -> U {
     struct AllowFailure {
-        let t: *rust_task;
+        t: *rust_task,
         drop { rustrt::rust_task_allow_kill(self.t); }
     }
 
@@ -629,7 +629,7 @@ unsafe fn unkillable<U>(f: fn() -> U) -> U {
 /// The inverse of unkillable. Only ever to be used nested in unkillable().
 unsafe fn rekillable<U>(f: fn() -> U) -> U {
     struct DisallowFailure {
-        let t: *rust_task;
+        t: *rust_task,
         drop { rustrt::rust_task_inhibit_kill(self.t); }
     }
 
@@ -651,7 +651,7 @@ unsafe fn rekillable<U>(f: fn() -> U) -> U {
  */
 unsafe fn atomically<U>(f: fn() -> U) -> U {
     struct DeferInterrupts {
-        let t: *rust_task;
+        t: *rust_task,
         drop {
             rustrt::rust_task_allow_yield(self.t);
             rustrt::rust_task_allow_kill(self.t);
@@ -948,13 +948,13 @@ fn each_ancestor(list:        &mut AncestorList,
 
 // One of these per task.
 struct TCB {
-    let me:            *rust_task;
+    me:            *rust_task,
     // List of tasks with whose fates this one's is intertwined.
-    let tasks:         TaskGroupArc; // 'none' means the group has failed.
+    tasks:         TaskGroupArc, // 'none' means the group has failed.
     // Lists of tasks who will kill us if they fail, but whom we won't kill.
-    let mut ancestors: AncestorList;
-    let is_main:       bool;
-    let notifier:      Option<AutoNotify>;
+    mut ancestors: AncestorList,
+    is_main:       bool,
+    notifier:      Option<AutoNotify>,
     // Runs on task exit.
     drop {
         // If we are failing, the whole taskgroup needs to die.
@@ -995,8 +995,8 @@ fn TCB(me: *rust_task, +tasks: TaskGroupArc, +ancestors: AncestorList,
 }
 
 struct AutoNotify {
-    let notify_chan: comm::Chan<Notification>;
-    let mut failed:  bool;
+    notify_chan: comm::Chan<Notification>,
+    mut failed:  bool,
     drop {
         let result = if self.failed { Failure } else { Success };
         comm::send(self.notify_chan, Exit(get_task(), result));
diff --git a/src/libcore/unsafe.rs b/src/libcore/unsafe.rs
index e4a73c12921..4cf6ec97466 100644
--- a/src/libcore/unsafe.rs
+++ b/src/libcore/unsafe.rs
@@ -280,7 +280,7 @@ extern mod rustrt {
 }
 
 struct LittleLock {
-    let l: rust_little_lock;
+    l: rust_little_lock,
     drop { rustrt::rust_destroy_little_lock(self.l); }
 }
 
@@ -294,7 +294,7 @@ impl LittleLock {
     #[inline(always)]
     unsafe fn lock<T>(f: fn() -> T) -> T {
         struct Unlock {
-            let l: rust_little_lock;
+            l: rust_little_lock,
             drop { rustrt::rust_unlock_little_lock(self.l); }
         }