about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-10-22 15:31:26 -0700
committerbors <bors@rust-lang.org>2013-10-22 15:31:26 -0700
commita7453ad0dffd94e57389b893527111c98a96ec40 (patch)
tree20cb7a545b241e074a653ff223bef484fa4a5c2d /src/libstd
parentb477f7a7b74615bba9ab3074082f9cc76a24e8a3 (diff)
parent7e6f5bb5c9eaab292a755036656cf62bfc669974 (diff)
downloadrust-a7453ad0dffd94e57389b893527111c98a96ec40.tar.gz
rust-a7453ad0dffd94e57389b893527111c98a96ec40.zip
auto merge of #9969 : reedlepee123/rust/priv_fields, r=bstrie
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fmt/mod.rs1
-rw-r--r--src/libstd/io.rs12
-rw-r--r--src/libstd/iter.rs4
-rw-r--r--src/libstd/reflect.rs2
-rw-r--r--src/libstd/repr.rs8
-rw-r--r--src/libstd/rt/borrowck.rs4
-rw-r--r--src/libstd/rt/comm.rs8
-rw-r--r--src/libstd/rt/context.rs6
-rw-r--r--src/libstd/rt/crate_map.rs6
-rw-r--r--src/libstd/rt/io/file.rs4
-rw-r--r--src/libstd/rt/io/flate.rs4
-rw-r--r--src/libstd/rt/io/mock.rs6
-rw-r--r--src/libstd/rt/kill.rs8
-rw-r--r--src/libstd/rt/local_heap.rs4
-rw-r--r--src/libstd/rt/rc.rs2
-rw-r--r--src/libstd/rt/rtio.rs2
-rw-r--r--src/libstd/rt/sched.rs12
-rw-r--r--src/libstd/rt/stack.rs4
-rw-r--r--src/libstd/rt/task.rs4
-rw-r--r--src/libstd/rt/thread.rs6
-rw-r--r--src/libstd/rt/tube.rs2
-rw-r--r--src/libstd/rt/uv/addrinfo.rs2
-rw-r--r--src/libstd/rt/uv/file.rs2
-rw-r--r--src/libstd/rt/uv/mod.rs2
-rw-r--r--src/libstd/rt/uv/uvio.rs46
-rw-r--r--src/libstd/rt/uv/uvll.rs64
-rw-r--r--src/libstd/run.rs2
-rw-r--r--src/libstd/str.rs1
-rw-r--r--src/libstd/task/mod.rs18
-rw-r--r--src/libstd/task/spawn.rs6
-rw-r--r--src/libstd/unstable/intrinsics.rs8
-rw-r--r--src/libstd/unstable/raw.rs2
-rw-r--r--src/libstd/unstable/sync.rs4
33 files changed, 131 insertions, 135 deletions
diff --git a/src/libstd/fmt/mod.rs b/src/libstd/fmt/mod.rs
index e7fa81fc87a..9d5c9c1a5cd 100644
--- a/src/libstd/fmt/mod.rs
+++ b/src/libstd/fmt/mod.rs
@@ -490,7 +490,6 @@ pub struct Formatter<'self> {
 
     /// Output buffer.
     buf: &'self mut io::Writer,
-
     priv curarg: vec::VecIterator<'self, Argument<'self>>,
     priv args: &'self [Argument<'self>],
 }
diff --git a/src/libstd/io.rs b/src/libstd/io.rs
index 94a6b7cfea8..4e55c5fe60e 100644
--- a/src/libstd/io.rs
+++ b/src/libstd/io.rs
@@ -1009,7 +1009,7 @@ impl<R:Reader,C> Reader for Wrapper<R, C> {
 }
 
 pub struct FILERes {
-    f: *libc::FILE,
+    priv f: *libc::FILE,
 }
 
 impl FILERes {
@@ -1282,7 +1282,7 @@ impl Writer for fd_t {
 }
 
 pub struct FdRes {
-    fd: fd_t,
+    priv fd: fd_t,
 }
 
 impl FdRes {
@@ -1792,7 +1792,7 @@ pub mod fsync {
 
     // Artifacts that need to fsync on destruction
     pub struct Res<t> {
-        arg: Arg<t>,
+        priv arg: Arg<t>,
     }
 
     impl <t> Res<t> {
@@ -1815,9 +1815,9 @@ pub mod fsync {
     }
 
     pub struct Arg<t> {
-        val: t,
-        opt_level: Option<Level>,
-        fsync_fn: extern "Rust" fn(f: &t, Level) -> int,
+        priv val: t,
+        priv opt_level: Option<Level>,
+        priv fsync_fn: extern "Rust" fn(f: &t, Level) -> int,
     }
 
     // fsync file after executing blk
diff --git a/src/libstd/iter.rs b/src/libstd/iter.rs
index 01af3d93157..771be3b2a13 100644
--- a/src/libstd/iter.rs
+++ b/src/libstd/iter.rs
@@ -1790,9 +1790,9 @@ impl<'self, A, St> Iterator<A> for Unfold<'self, A, St> {
 #[deriving(Clone)]
 pub struct Counter<A> {
     /// The current state the counter is at (next value to be yielded)
-    state: A,
+    priv state: A,
     /// The amount that this iterator is stepping by
-    step: A
+    priv step: A
 }
 
 /// Creates a new counter with the specified start/step
diff --git a/src/libstd/reflect.rs b/src/libstd/reflect.rs
index 1cd76727716..d63b14f982d 100644
--- a/src/libstd/reflect.rs
+++ b/src/libstd/reflect.rs
@@ -41,7 +41,7 @@ pub fn align(size: uint, align: uint) -> uint {
 
 /// Adaptor to wrap around visitors implementing MovePtr.
 pub struct MovePtrAdaptor<V> {
-    inner: V
+    priv inner: V
 }
 pub fn MovePtrAdaptor<V:TyVisitor + MovePtr>(v: V) -> MovePtrAdaptor<V> {
     MovePtrAdaptor { inner: v }
diff --git a/src/libstd/repr.rs b/src/libstd/repr.rs
index 4feb1ca1910..d03621eb60d 100644
--- a/src/libstd/repr.rs
+++ b/src/libstd/repr.rs
@@ -98,10 +98,10 @@ enum VariantState {
 }
 
 pub struct ReprVisitor<'self> {
-    ptr: *c_void,
-    ptr_stk: ~[*c_void],
-    var_stk: ~[VariantState],
-    writer: &'self mut io::Writer
+    priv ptr: *c_void,
+    priv ptr_stk: ~[*c_void],
+    priv var_stk: ~[VariantState],
+    priv writer: &'self mut io::Writer
 }
 
 pub fn ReprVisitor<'a>(ptr: *c_void,
diff --git a/src/libstd/rt/borrowck.rs b/src/libstd/rt/borrowck.rs
index 3c2000c522c..4426a3eafe1 100644
--- a/src/libstd/rt/borrowck.rs
+++ b/src/libstd/rt/borrowck.rs
@@ -29,9 +29,9 @@ static ALL_BITS: uint = FROZEN_BIT | MUT_BIT;
 
 #[deriving(Eq)]
 pub struct BorrowRecord {
-    box: *mut raw::Box<()>,
+    priv box: *mut raw::Box<()>,
     file: *c_char,
-    line: size_t
+    priv line: size_t
 }
 
 fn try_take_task_borrow_list() -> Option<~[BorrowRecord]> {
diff --git a/src/libstd/rt/comm.rs b/src/libstd/rt/comm.rs
index 4eae8bdc9a8..0d4271a33c2 100644
--- a/src/libstd/rt/comm.rs
+++ b/src/libstd/rt/comm.rs
@@ -48,14 +48,14 @@ struct Packet<T> {
 
 // A one-shot channel.
 pub struct ChanOne<T> {
-    void_packet: *mut Void,
-    suppress_finalize: bool
+    priv void_packet: *mut Void,
+    priv suppress_finalize: bool
 }
 
 /// A one-shot port.
 pub struct PortOne<T> {
-    void_packet: *mut Void,
-    suppress_finalize: bool
+    priv void_packet: *mut Void,
+    priv suppress_finalize: bool
 }
 
 pub fn oneshot<T: Send>() -> (PortOne<T>, ChanOne<T>) {
diff --git a/src/libstd/rt/context.rs b/src/libstd/rt/context.rs
index 7f7545ca230..9508c757c9d 100644
--- a/src/libstd/rt/context.rs
+++ b/src/libstd/rt/context.rs
@@ -25,11 +25,11 @@ pub static RED_ZONE: uint = 20 * 1024;
 // then misalign the regs again.
 pub struct Context {
     /// The context entry point, saved here for later destruction
-    start: Option<~~fn()>,
+    priv start: Option<~~fn()>,
     /// Hold the registers while the task or scheduler is suspended
-    regs: ~Registers,
+    priv regs: ~Registers,
     /// Lower bound and upper bound for the stack
-    stack_bounds: Option<(uint, uint)>,
+    priv stack_bounds: Option<(uint, uint)>,
 }
 
 impl Context {
diff --git a/src/libstd/rt/crate_map.rs b/src/libstd/rt/crate_map.rs
index d33e1af90f8..dd71426938d 100644
--- a/src/libstd/rt/crate_map.rs
+++ b/src/libstd/rt/crate_map.rs
@@ -26,9 +26,9 @@ pub struct ModEntry<'self> {
 }
 
 pub struct CrateMap<'self> {
-    version: i32,
-    entries: &'self [ModEntry<'self>],
-    children: &'self [&'self CrateMap<'self>]
+     priv version: i32,
+     priv entries: &'self [ModEntry<'self>],
+     priv children: &'self [&'self CrateMap<'self>]
 }
 
 #[cfg(not(windows))]
diff --git a/src/libstd/rt/io/file.rs b/src/libstd/rt/io/file.rs
index a5d593d2454..3869f99adea 100644
--- a/src/libstd/rt/io/file.rs
+++ b/src/libstd/rt/io/file.rs
@@ -362,8 +362,8 @@ impl Seek for FileWriter {
 /// For this reason, it is best to use the access-constrained wrappers that are
 /// exposed via `FileInfo.open_reader()` and `FileInfo.open_writer()`.
 pub struct FileStream {
-    fd: ~RtioFileStream,
-    last_nread: int,
+    priv fd: ~RtioFileStream,
+    priv last_nread: int,
 }
 
 /// a `std::rt::io::Reader` trait impl for file I/O.
diff --git a/src/libstd/rt/io/flate.rs b/src/libstd/rt/io/flate.rs
index 7c72ce6ba89..8a5aa171eb8 100644
--- a/src/libstd/rt/io/flate.rs
+++ b/src/libstd/rt/io/flate.rs
@@ -17,7 +17,7 @@ use super::*;
 
 /// A Writer decorator that compresses using the 'deflate' scheme
 pub struct DeflateWriter<W> {
-    inner_writer: W
+    priv inner_writer: W
 }
 
 impl<W: Writer> DeflateWriter<W> {
@@ -56,7 +56,7 @@ impl<W: Writer> Decorator<W> for DeflateWriter<W> {
 
 /// A Reader decorator that decompresses using the 'deflate' scheme
 pub struct InflateReader<R> {
-    inner_reader: R
+    priv inner_reader: R
 }
 
 impl<R: Reader> InflateReader<R> {
diff --git a/src/libstd/rt/io/mock.rs b/src/libstd/rt/io/mock.rs
index c46e1372c64..44709c7b7b6 100644
--- a/src/libstd/rt/io/mock.rs
+++ b/src/libstd/rt/io/mock.rs
@@ -13,7 +13,7 @@ use rt::io::{Reader, Writer};
 
 pub struct MockReader {
     read: ~fn(buf: &mut [u8]) -> Option<uint>,
-    eof: ~fn() -> bool
+    priv eof: ~fn() -> bool
 }
 
 impl MockReader {
@@ -31,8 +31,8 @@ impl Reader for MockReader {
 }
 
 pub struct MockWriter {
-    write: ~fn(buf: &[u8]),
-    flush: ~fn()
+    priv write: ~fn(buf: &[u8]),
+    priv flush: ~fn()
 }
 
 impl MockWriter {
diff --git a/src/libstd/rt/kill.rs b/src/libstd/rt/kill.rs
index 8029e3f6431..19f17ca966d 100644
--- a/src/libstd/rt/kill.rs
+++ b/src/libstd/rt/kill.rs
@@ -219,17 +219,17 @@ pub struct Death {
     // might kill it. This is optional so we can take it by-value at exit time.
     kill_handle:     Option<KillHandle>,
     // Handle to a watching parent, if we have one, for exit code propagation.
-    watching_parent: Option<KillHandle>,
+    priv watching_parent: Option<KillHandle>,
     // Action to be done with the exit code. If set, also makes the task wait
     // until all its watched children exit before collecting the status.
     on_exit:         Option<~fn(bool)>,
     // nesting level counter for task::unkillable calls (0 == killable).
-    unkillable:      int,
+    priv unkillable:      int,
     // nesting level counter for unstable::atomically calls (0 == can deschedule).
-    wont_sleep:      int,
+    priv wont_sleep:      int,
     // A "spare" handle to the kill flag inside the kill handle. Used during
     // blocking/waking as an optimization to avoid two xadds on the refcount.
-    spare_kill_flag: Option<KillFlagHandle>,
+    priv spare_kill_flag: Option<KillFlagHandle>,
 }
 
 impl Drop for KillFlag {
diff --git a/src/libstd/rt/local_heap.rs b/src/libstd/rt/local_heap.rs
index 262da9f3b8e..14df292343e 100644
--- a/src/libstd/rt/local_heap.rs
+++ b/src/libstd/rt/local_heap.rs
@@ -32,8 +32,8 @@ pub type OpaqueBox = c_void;
 pub type TypeDesc = c_void;
 
 pub struct LocalHeap {
-    memory_region: *MemoryRegion,
-    boxed_region: *BoxedRegion
+    priv memory_region: *MemoryRegion,
+    priv boxed_region: *BoxedRegion
 }
 
 impl LocalHeap {
diff --git a/src/libstd/rt/rc.rs b/src/libstd/rt/rc.rs
index 2ba00c3a2fb..2699dab6d38 100644
--- a/src/libstd/rt/rc.rs
+++ b/src/libstd/rt/rc.rs
@@ -24,7 +24,7 @@ use libc::c_void;
 use cast;
 
 pub struct RC<T> {
-    p: *c_void // ~(uint, T)
+    priv p: *c_void // ~(uint, T)
 }
 
 impl<T> RC<T> {
diff --git a/src/libstd/rt/rtio.rs b/src/libstd/rt/rtio.rs
index ca521c792dc..501def8b060 100644
--- a/src/libstd/rt/rtio.rs
+++ b/src/libstd/rt/rtio.rs
@@ -66,7 +66,7 @@ pub struct FileOpenConfig {
     /// Flags for file access mode (as per open(2))
     flags: int,
     /// File creation mode, ignored unless O_CREAT is passed as part of flags
-    mode: int
+    priv mode: int
 }
 
 pub trait IoFactory {
diff --git a/src/libstd/rt/sched.rs b/src/libstd/rt/sched.rs
index 336d2518e43..48cd7987507 100644
--- a/src/libstd/rt/sched.rs
+++ b/src/libstd/rt/sched.rs
@@ -66,26 +66,26 @@ pub struct Scheduler {
     event_loop: ~EventLoopObject,
     /// The scheduler runs on a special task. When it is not running
     /// it is stored here instead of the work queue.
-    sched_task: Option<~Task>,
+    priv sched_task: Option<~Task>,
     /// An action performed after a context switch on behalf of the
     /// code running before the context switch
-    cleanup_job: Option<CleanupJob>,
+    priv cleanup_job: Option<CleanupJob>,
     /// Should this scheduler run any task, or only pinned tasks?
     run_anything: bool,
     /// If the scheduler shouldn't run some tasks, a friend to send
     /// them to.
-    friend_handle: Option<SchedHandle>,
+    priv friend_handle: Option<SchedHandle>,
     /// A fast XorShift rng for scheduler use
     rng: XorShiftRng,
     /// A toggleable idle callback
-    idle_callback: Option<~PausibleIdleCallback>,
+    priv idle_callback: Option<~PausibleIdleCallback>,
     /// A countdown that starts at a random value and is decremented
     /// every time a yield check is performed. When it hits 0 a task
     /// will yield.
-    yield_check_count: uint,
+    priv yield_check_count: uint,
     /// A flag to tell the scheduler loop it needs to do some stealing
     /// in order to introduce randomness as part of a yield
-    steal_for_yield: bool
+    priv steal_for_yield: bool
 }
 
 /// An indication of how hard to work on a given operation, the difference
diff --git a/src/libstd/rt/stack.rs b/src/libstd/rt/stack.rs
index fddee5882b9..55bd4b0732a 100644
--- a/src/libstd/rt/stack.rs
+++ b/src/libstd/rt/stack.rs
@@ -15,8 +15,8 @@ use ops::Drop;
 use libc::{c_uint, uintptr_t};
 
 pub struct StackSegment {
-    buf: ~[u8],
-    valgrind_id: c_uint
+    priv buf: ~[u8],
+    priv valgrind_id: c_uint
 }
 
 impl StackSegment {
diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs
index a6f9e11e40e..c4f352501a0 100644
--- a/src/libstd/rt/task.rs
+++ b/src/libstd/rt/task.rs
@@ -44,7 +44,7 @@ use send_str::SendStr;
 
 pub struct Task {
     heap: LocalHeap,
-    gc: GarbageCollector,
+    priv gc: GarbageCollector,
     storage: LocalStorage,
     logger: StdErrLogger,
     unwinder: Unwinder,
@@ -69,7 +69,7 @@ pub struct Coroutine {
     /// The segment of stack on which the task is currently running or
     /// if the task is blocked, on which the task will resume
     /// execution.
-    current_stack_segment: StackSegment,
+    priv current_stack_segment: StackSegment,
     /// Always valid if the task is alive and not running.
     saved_context: Context
 }
diff --git a/src/libstd/rt/thread.rs b/src/libstd/rt/thread.rs
index e774b81da35..949d73ecc4f 100644
--- a/src/libstd/rt/thread.rs
+++ b/src/libstd/rt/thread.rs
@@ -18,9 +18,9 @@ use uint;
 type raw_thread = libc::c_void;
 
 pub struct Thread {
-    main: ~fn(),
-    raw_thread: *raw_thread,
-    joined: bool,
+    priv main: ~fn(),
+    priv raw_thread: *raw_thread,
+    priv joined: bool
 }
 
 impl Thread {
diff --git a/src/libstd/rt/tube.rs b/src/libstd/rt/tube.rs
index b8e535e4c7d..16fd3fa38ea 100644
--- a/src/libstd/rt/tube.rs
+++ b/src/libstd/rt/tube.rs
@@ -28,7 +28,7 @@ struct TubeState<T> {
 }
 
 pub struct Tube<T> {
-    p: RC<TubeState<T>>
+    priv p: RC<TubeState<T>>
 }
 
 impl<T> Tube<T> {
diff --git a/src/libstd/rt/uv/addrinfo.rs b/src/libstd/rt/uv/addrinfo.rs
index 83a7e64b139..f2abcd3aca7 100644
--- a/src/libstd/rt/uv/addrinfo.rs
+++ b/src/libstd/rt/uv/addrinfo.rs
@@ -25,7 +25,7 @@ type GetAddrInfoCallback = ~fn(GetAddrInfoRequest, &UvAddrInfo, Option<UvError>)
 pub struct GetAddrInfoRequest(*uvll::uv_getaddrinfo_t);
 
 pub struct RequestData {
-    getaddrinfo_cb: Option<GetAddrInfoCallback>,
+    priv getaddrinfo_cb: Option<GetAddrInfoCallback>,
 }
 
 impl GetAddrInfoRequest {
diff --git a/src/libstd/rt/uv/file.rs b/src/libstd/rt/uv/file.rs
index 3a6d858df79..5d64ca4d755 100644
--- a/src/libstd/rt/uv/file.rs
+++ b/src/libstd/rt/uv/file.rs
@@ -25,7 +25,7 @@ pub struct FsRequest(*uvll::uv_fs_t);
 impl Request for FsRequest {}
 
 pub struct RequestData {
-    complete_cb: Option<FsCallback>
+    priv complete_cb: Option<FsCallback>
 }
 
 impl FsRequest {
diff --git a/src/libstd/rt/uv/mod.rs b/src/libstd/rt/uv/mod.rs
index 67926b35a62..3a6a3acbc53 100644
--- a/src/libstd/rt/uv/mod.rs
+++ b/src/libstd/rt/uv/mod.rs
@@ -80,7 +80,7 @@ pub mod pipe;
 /// with dtors may not be destructured, but tuple structs can,
 /// but the results are not correct.
 pub struct Loop {
-    handle: *uvll::uv_loop_t
+    priv handle: *uvll::uv_loop_t
 }
 
 /// The trait implemented by uv 'watchers' (handles). Watchers are
diff --git a/src/libstd/rt/uv/uvio.rs b/src/libstd/rt/uv/uvio.rs
index d5893d6d014..13c3a30eed3 100644
--- a/src/libstd/rt/uv/uvio.rs
+++ b/src/libstd/rt/uv/uvio.rs
@@ -180,7 +180,7 @@ fn socket_name<T, U: Watcher + NativeHandle<*T>>(sk: SocketNameKind,
 
 // Obviously an Event Loop is always home.
 pub struct UvEventLoop {
-    uvio: UvIoFactory
+    priv uvio: UvIoFactory
 }
 
 impl UvEventLoop {
@@ -240,9 +240,9 @@ impl EventLoop for UvEventLoop {
 }
 
 pub struct UvPausibleIdleCallback {
-    watcher: IdleWatcher,
-    idle_flag: bool,
-    closed: bool
+    priv watcher: IdleWatcher,
+    priv idle_flag: bool,
+    priv closed: bool
 }
 
 impl UvPausibleIdleCallback {
@@ -294,10 +294,10 @@ fn test_callback_run_once() {
 // The entire point of async is to call into a loop from other threads so it does not need to home.
 pub struct UvRemoteCallback {
     // The uv async handle for triggering the callback
-    async: AsyncWatcher,
+    priv async: AsyncWatcher,
     // A flag to tell the callback to exit, set from the dtor. This is
     // almost never contested - only in rare races with the dtor.
-    exit_flag: Exclusive<bool>
+    priv exit_flag: Exclusive<bool>
 }
 
 impl UvRemoteCallback {
@@ -801,8 +801,8 @@ impl IoFactory for UvIoFactory {
 }
 
 pub struct UvTcpListener {
-    watcher : TcpWatcher,
-    home: SchedHandle,
+    priv watcher : TcpWatcher,
+    priv home: SchedHandle,
 }
 
 impl HomingIO for UvTcpListener {
@@ -863,8 +863,8 @@ impl RtioTcpListener for UvTcpListener {
 }
 
 pub struct UvTcpAcceptor {
-    listener: UvTcpListener,
-    incoming: Tube<Result<~RtioTcpStreamObject, IoError>>,
+    priv listener: UvTcpListener,
+    priv incoming: Tube<Result<~RtioTcpStreamObject, IoError>>,
 }
 
 impl HomingIO for UvTcpAcceptor {
@@ -988,7 +988,7 @@ fn write_stream(mut watcher: StreamWatcher,
 
 pub struct UvUnboundPipe {
     pipe: Pipe,
-    home: SchedHandle,
+    priv home: SchedHandle,
 }
 
 impl HomingIO for UvUnboundPipe {
@@ -1040,8 +1040,8 @@ impl RtioPipe for UvPipeStream {
 }
 
 pub struct UvTcpStream {
-    watcher: TcpWatcher,
-    home: SchedHandle,
+    priv watcher: TcpWatcher,
+    priv home: SchedHandle,
 }
 
 impl HomingIO for UvTcpStream {
@@ -1140,8 +1140,8 @@ impl RtioTcpStream for UvTcpStream {
 }
 
 pub struct UvUdpSocket {
-    watcher: UdpWatcher,
-    home: SchedHandle,
+    priv watcher: UdpWatcher,
+    priv home: SchedHandle,
 }
 
 impl HomingIO for UvUdpSocket {
@@ -1350,8 +1350,8 @@ impl RtioUdpSocket for UvUdpSocket {
 }
 
 pub struct UvTimer {
-    watcher: timer::TimerWatcher,
-    home: SchedHandle,
+    priv watcher: timer::TimerWatcher,
+    priv home: SchedHandle,
 }
 
 impl HomingIO for UvTimer {
@@ -1397,10 +1397,10 @@ impl RtioTimer for UvTimer {
 }
 
 pub struct UvFileStream {
-    loop_: Loop,
-    fd: c_int,
-    close_on_drop: bool,
-    home: SchedHandle
+    priv loop_: Loop,
+    priv fd: c_int,
+    priv close_on_drop: bool,
+    priv home: SchedHandle
 }
 
 impl HomingIO for UvFileStream {
@@ -1530,11 +1530,11 @@ impl RtioFileStream for UvFileStream {
 }
 
 pub struct UvProcess {
-    process: process::Process,
+    priv process: process::Process,
 
     // Sadly, this structure must be created before we return it, so in that
     // brief interim the `home` is None.
-    home: Option<SchedHandle>,
+    priv home: Option<SchedHandle>,
 
     // All None until the process exits (exit_error may stay None)
     priv exit_status: Option<int>,
diff --git a/src/libstd/rt/uv/uvll.rs b/src/libstd/rt/uv/uvll.rs
index a80d5cbc1fb..96c5dd068d0 100644
--- a/src/libstd/rt/uv/uvll.rs
+++ b/src/libstd/rt/uv/uvll.rs
@@ -134,26 +134,26 @@ pub type uv_pipe_t = c_void;
 
 pub struct uv_timespec_t {
     tv_sec: libc::c_long,
-    tv_nsec: libc::c_long
+    priv tv_nsec: libc::c_long
 }
 
 pub struct uv_stat_t {
-    st_dev: libc::uint64_t,
+    priv st_dev: libc::uint64_t,
     st_mode: libc::uint64_t,
-    st_nlink: libc::uint64_t,
-    st_uid: libc::uint64_t,
-    st_gid: libc::uint64_t,
-    st_rdev: libc::uint64_t,
-    st_ino: libc::uint64_t,
+    priv st_nlink: libc::uint64_t,
+    priv st_uid: libc::uint64_t,
+    priv st_gid: libc::uint64_t,
+    priv st_rdev: libc::uint64_t,
+    priv st_ino: libc::uint64_t,
     st_size: libc::uint64_t,
-    st_blksize: libc::uint64_t,
-    st_blocks: libc::uint64_t,
-    st_flags: libc::uint64_t,
-    st_gen: libc::uint64_t,
+    priv st_blksize: libc::uint64_t,
+    priv st_blocks: libc::uint64_t,
+    priv st_flags: libc::uint64_t,
+    priv st_gen: libc::uint64_t,
     st_atim: uv_timespec_t,
     st_mtim: uv_timespec_t,
     st_ctim: uv_timespec_t,
-    st_birthtim: uv_timespec_t
+    priv st_birthtim: uv_timespec_t
 }
 
 impl uv_stat_t {
@@ -231,37 +231,37 @@ pub type socklen_t = c_int;
 #[cfg(target_os = "android")]
 #[cfg(target_os = "linux")]
 pub struct addrinfo {
-    ai_flags: c_int,
-    ai_family: c_int,
-    ai_socktype: c_int,
-    ai_protocol: c_int,
-    ai_addrlen: socklen_t,
+    priv ai_flags: c_int,
+    priv ai_family: c_int,
+    priv ai_socktype: c_int,
+    priv ai_protocol: c_int,
+    priv ai_addrlen: socklen_t,
     ai_addr: *sockaddr,
-    ai_canonname: *char,
+    priv ai_canonname: *char,
     ai_next: *addrinfo
 }
 
 #[cfg(target_os = "macos")]
 #[cfg(target_os = "freebsd")]
 pub struct addrinfo {
-    ai_flags: c_int,
-    ai_family: c_int,
-    ai_socktype: c_int,
-    ai_protocol: c_int,
-    ai_addrlen: socklen_t,
-    ai_canonname: *char,
+    priv ai_flags: c_int,
+    priv ai_family: c_int,
+    priv ai_socktype: c_int,
+    priv ai_protocol: c_int,
+    priv ai_addrlen: socklen_t,
+    priv ai_canonname: *char,
     ai_addr: *sockaddr,
     ai_next: *addrinfo
 }
 
 #[cfg(windows)]
 pub struct addrinfo {
-    ai_flags: c_int,
-    ai_family: c_int,
-    ai_socktype: c_int,
-    ai_protocol: c_int,
-    ai_addrlen: size_t,
-    ai_canonname: *char,
+    priv ai_flags: c_int,
+    priv ai_family: c_int,
+    priv ai_socktype: c_int,
+    priv ai_protocol: c_int,
+    priv ai_addrlen: size_t,
+    priv ai_canonname: *char,
     ai_addr: *sockaddr,
     ai_next: *addrinfo
 }
@@ -960,8 +960,8 @@ pub unsafe fn freeaddrinfo(ai: *addrinfo) {
 }
 
 pub struct uv_err_data {
-    err_name: ~str,
-    err_msg: ~str,
+    priv err_name: ~str,
+    priv err_msg: ~str,
 }
 
 extern {
diff --git a/src/libstd/run.rs b/src/libstd/run.rs
index a4060586318..483bb181373 100644
--- a/src/libstd/run.rs
+++ b/src/libstd/run.rs
@@ -34,7 +34,6 @@ pub struct Process {
 
 /// Options that can be given when starting a Process.
 pub struct ProcessOptions<'self> {
-
     /**
      * If this is None then the new process will have the same initial
      * environment as the parent process.
@@ -99,7 +98,6 @@ impl <'self> ProcessOptions<'self> {
 
 /// The output of a finished process.
 pub struct ProcessOutput {
-
     /// The status (exit code) of the process.
     status: int,
 
diff --git a/src/libstd/str.rs b/src/libstd/str.rs
index 883934124a6..f134788942c 100644
--- a/src/libstd/str.rs
+++ b/src/libstd/str.rs
@@ -998,7 +998,6 @@ pub fn utf8_char_width(b: u8) -> uint {
 pub struct CharRange {
     /// Current `char`
     ch: char,
-
     /// Index of the first byte of the next `char`
     next: uint
 }
diff --git a/src/libstd/task/mod.rs b/src/libstd/task/mod.rs
index 970a62b676f..30c99c62885 100644
--- a/src/libstd/task/mod.rs
+++ b/src/libstd/task/mod.rs
@@ -108,7 +108,7 @@ pub enum SchedMode {
  *
  */
 pub struct SchedOpts {
-    mode: SchedMode,
+    priv mode: SchedMode,
 }
 
 /**
@@ -144,11 +144,11 @@ pub struct SchedOpts {
  *           scheduler other tasks will be impeded or even blocked indefinitely.
  */
 pub struct TaskOpts {
-    linked: bool,
-    supervised: bool,
-    watched: bool,
-    indestructible: bool,
-    notify_chan: Option<Chan<TaskResult>>,
+    priv linked: bool,
+    priv supervised: bool,
+    priv watched: bool,
+    priv indestructible: bool,
+    priv notify_chan: Option<Chan<TaskResult>>,
     name: Option<SendStr>,
     sched: SchedOpts,
     stack_size: Option<uint>
@@ -170,9 +170,9 @@ pub struct TaskOpts {
 // FIXME (#3724): Replace the 'consumed' bit with move mode on self
 pub struct TaskBuilder {
     opts: TaskOpts,
-    gen_body: Option<~fn(v: ~fn()) -> ~fn()>,
-    can_not_copy: Option<util::NonCopyable>,
-    consumed: bool,
+    priv gen_body: Option<~fn(v: ~fn()) -> ~fn()>,
+    priv can_not_copy: Option<util::NonCopyable>,
+    priv consumed: bool,
 }
 
 /**
diff --git a/src/libstd/task/spawn.rs b/src/libstd/task/spawn.rs
index 7cf0f04c7e9..dec13eded39 100644
--- a/src/libstd/task/spawn.rs
+++ b/src/libstd/task/spawn.rs
@@ -308,10 +308,10 @@ fn each_ancestor(list:        &mut AncestorList,
 // One of these per task.
 pub struct Taskgroup {
     // List of tasks with whose fates this one's is intertwined.
-    tasks:      TaskGroupArc, // 'none' means the group has failed.
+    priv tasks:      TaskGroupArc, // 'none' means the group has failed.
     // Lists of tasks who will kill us if they fail, but whom we won't kill.
-    ancestors:  AncestorList,
-    notifier:   Option<AutoNotify>,
+    priv ancestors:  AncestorList,
+    priv notifier:   Option<AutoNotify>,
 }
 
 impl Drop for Taskgroup {
diff --git a/src/libstd/unstable/intrinsics.rs b/src/libstd/unstable/intrinsics.rs
index 68fdfd73013..ee44bf4d996 100644
--- a/src/libstd/unstable/intrinsics.rs
+++ b/src/libstd/unstable/intrinsics.rs
@@ -49,23 +49,23 @@ pub struct TyDesc {
     align: uint,
 
     // Called on a copy of a value of type `T` *after* memcpy
-    take_glue: GlueFn,
+    priv take_glue: GlueFn,
 
     // Called when a value of type `T` is no longer needed
     drop_glue: GlueFn,
 
     // Called by drop glue when a value of type `T` can be freed
-    free_glue: GlueFn,
+    priv free_glue: GlueFn,
 
     // Called by reflection visitor to visit a value of type `T`
-    visit_glue: GlueFn,
+    priv visit_glue: GlueFn,
 
     // If T represents a box pointer (`@U` or `~U`), then
     // `borrow_offset` is the amount that the pointer must be adjusted
     // to find the payload.  This is always derivable from the type
     // `U`, but in the case of `@Trait` or `~Trait` objects, the type
     // `U` is unknown.
-    borrow_offset: uint,
+    priv borrow_offset: uint,
 
     // Name corresponding to the type
     name: &'static str
diff --git a/src/libstd/unstable/raw.rs b/src/libstd/unstable/raw.rs
index ac0e83df7ef..b5d7cc47fdc 100644
--- a/src/libstd/unstable/raw.rs
+++ b/src/libstd/unstable/raw.rs
@@ -15,7 +15,7 @@ use unstable::intrinsics::TyDesc;
 pub struct Box<T> {
     ref_count: uint,
     type_desc: *TyDesc,
-    prev: *Box<T>,
+    priv prev: *Box<T>,
     next: *Box<T>,
     data: T
 }
diff --git a/src/libstd/unstable/sync.rs b/src/libstd/unstable/sync.rs
index 4c6ad469d8c..9d15dd031e0 100644
--- a/src/libstd/unstable/sync.rs
+++ b/src/libstd/unstable/sync.rs
@@ -304,7 +304,7 @@ pub unsafe fn atomically<U>(f: &fn() -> U) -> U {
 type rust_little_lock = *libc::c_void;
 
 pub struct LittleLock {
-    l: rust_little_lock,
+    priv l: rust_little_lock,
 }
 
 impl Drop for LittleLock {
@@ -353,7 +353,7 @@ struct ExData<T> {
  * need to block or deschedule while accessing shared state, use extra::sync::RWArc.
  */
 pub struct Exclusive<T> {
-    x: UnsafeArc<ExData<T>>
+    priv x: UnsafeArc<ExData<T>>
 }
 
 impl<T:Send> Clone for Exclusive<T> {