]> git.lizzy.rs Git - rust.git/commitdiff
std: Switch field privacy as necessary
authorAlex Crichton <alex@alexcrichton.com>
Thu, 27 Mar 2014 22:09:47 +0000 (15:09 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 31 Mar 2014 22:17:12 +0000 (15:17 -0700)
65 files changed:
src/libstd/ascii.rs
src/libstd/c_str.rs
src/libstd/c_vec.rs
src/libstd/cell.rs
src/libstd/comm/mod.rs
src/libstd/comm/select.rs
src/libstd/fmt/mod.rs
src/libstd/fmt/num.rs
src/libstd/fmt/parse.rs
src/libstd/fmt/rt.rs
src/libstd/gc.rs
src/libstd/hash/sip.rs
src/libstd/intrinsics.rs
src/libstd/io/buffered.rs
src/libstd/io/comm_adapters.rs
src/libstd/io/extensions.rs
src/libstd/io/fs.rs
src/libstd/io/mem.rs
src/libstd/io/mod.rs
src/libstd/io/net/addrinfo.rs
src/libstd/io/net/ip.rs
src/libstd/io/net/tcp.rs
src/libstd/io/net/udp.rs
src/libstd/io/net/unix.rs
src/libstd/io/pipe.rs
src/libstd/io/process.rs
src/libstd/io/signal.rs
src/libstd/io/stdio.rs
src/libstd/io/tempfile.rs
src/libstd/io/timer.rs
src/libstd/io/util.rs
src/libstd/iter.rs
src/libstd/kinds.rs
src/libstd/lib.rs
src/libstd/libc.rs
src/libstd/option.rs
src/libstd/os.rs
src/libstd/path/mod.rs
src/libstd/path/posix.rs
src/libstd/path/windows.rs
src/libstd/raw.rs
src/libstd/rc.rs
src/libstd/reflect.rs
src/libstd/repr.rs
src/libstd/rt/libunwind.rs
src/libstd/rt/local_heap.rs
src/libstd/rt/local_ptr.rs
src/libstd/rt/rtio.rs
src/libstd/rt/task.rs
src/libstd/rt/thread.rs
src/libstd/rt/unwind.rs
src/libstd/slice.rs
src/libstd/str.rs
src/libstd/sync/arc.rs
src/libstd/sync/atomics.rs
src/libstd/sync/deque.rs
src/libstd/sync/mpmc_bounded_queue.rs
src/libstd/sync/mpsc_queue.rs
src/libstd/sync/spsc_queue.rs
src/libstd/task.rs
src/libstd/ty.rs
src/libstd/unstable/dynamic_lib.rs
src/libstd/unstable/mutex.rs
src/libstd/unstable/sync.rs
src/libstd/vec.rs

index 57f7d1834588924e99c9cf4803aac717ff23f5c7..c9112caa1b9613048564105fe91897b492317d33 100644 (file)
@@ -25,7 +25,7 @@
 
 /// Datatype to hold one ascii character. It wraps a `u8`, with the highest bit always zero.
 #[deriving(Clone, Eq, Ord, TotalOrd, TotalEq, Hash)]
-pub struct Ascii { priv chr: u8 }
+pub struct Ascii { chr: u8 }
 
 impl Ascii {
     /// Converts an ascii character into a `u8`.
index 96c7c218127205e3c2fbd469361a215d8bd022c1..ca1a05a264743676f83b90db6e528f7f9379cf6b 100644 (file)
@@ -86,8 +86,8 @@
 /// This structure wraps a `*libc::c_char`, and will automatically free the
 /// memory it is pointing to when it goes out of scope.
 pub struct CString {
-    priv buf: *libc::c_char,
-    priv owns_buffer_: bool,
+    buf: *libc::c_char,
+    owns_buffer_: bool,
 }
 
 impl Clone for CString {
@@ -373,8 +373,8 @@ fn check_for_null(v: &[u8], buf: *mut libc::c_char) {
 ///
 /// Use with the `std::iter` module.
 pub struct CChars<'a> {
-    priv ptr: *libc::c_char,
-    priv marker: marker::ContravariantLifetime<'a>,
+    ptr: *libc::c_char,
+    marker: marker::ContravariantLifetime<'a>,
 }
 
 impl<'a> Iterator<libc::c_char> for CChars<'a> {
index a6cc4c64d2084c94af1cca6c88ea3602fd11a387..3b6b914cf14e55f81993c07b960bd63715f2d693 100644 (file)
@@ -44,9 +44,9 @@
 
 /// The type representing a foreign chunk of memory
 pub struct CVec<T> {
-    priv base: *mut T,
-    priv len: uint,
-    priv dtor: Option<proc:Send()>,
+    base: *mut T,
+    len: uint,
+    dtor: Option<proc:Send()>,
 }
 
 #[unsafe_destructor]
index a826521ab6ba50eb1645dc089fbfef29ebb2f4ae..102b87a3733f3332c0ecd8275a726d58bb879bed 100644 (file)
@@ -21,8 +21,8 @@
 
 /// A mutable memory location that admits only `Copy` data.
 pub struct Cell<T> {
-    priv value: Unsafe<T>,
-    priv noshare: marker::NoShare,
+    value: Unsafe<T>,
+    noshare: marker::NoShare,
 }
 
 impl<T:Copy> Cell<T> {
@@ -69,10 +69,10 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 
 /// A mutable memory location with dynamically checked borrow rules
 pub struct RefCell<T> {
-    priv value: Unsafe<T>,
-    priv borrow: BorrowFlag,
-    priv nocopy: marker::NoCopy,
-    priv noshare: marker::NoShare,
+    value: Unsafe<T>,
+    borrow: BorrowFlag,
+    nocopy: marker::NoCopy,
+    noshare: marker::NoShare,
 }
 
 // Values [1, MAX-1] represent the number of `Ref` active
@@ -202,7 +202,7 @@ fn eq(&self, other: &RefCell<T>) -> bool {
 
 /// Wraps a borrowed reference to a value in a `RefCell` box.
 pub struct Ref<'b, T> {
-    priv parent: &'b RefCell<T>
+    parent: &'b RefCell<T>
 }
 
 #[unsafe_destructor]
@@ -222,7 +222,7 @@ fn deref<'a>(&'a self) -> &'a T {
 
 /// Wraps a mutable borrowed reference to a value in a `RefCell` box.
 pub struct RefMut<'b, T> {
-    priv parent: &'b mut RefCell<T>
+    parent: &'b mut RefCell<T>
 }
 
 #[unsafe_destructor]
index ef8894a258cdceccc6494d1fe41465c08538516c..e951077ac83294ab3bd120c23c1985fe35574551 100644 (file)
@@ -289,34 +289,34 @@ fn f() $b
 /// The receiving-half of Rust's channel type. This half can only be owned by
 /// one task
 pub struct Receiver<T> {
-    priv inner: Flavor<T>,
-    priv receives: Cell<uint>,
+    inner: Flavor<T>,
+    receives: Cell<uint>,
     // can't share in an arc
-    priv marker: marker::NoShare,
+    marker: marker::NoShare,
 }
 
 /// An iterator over messages on a receiver, this iterator will block
 /// whenever `next` is called, waiting for a new message, and `None` will be
 /// returned when the corresponding channel has hung up.
 pub struct Messages<'a, T> {
-    priv rx: &'a Receiver<T>
+    rx: &'a Receiver<T>
 }
 
 /// The sending-half of Rust's asynchronous channel type. This half can only be
 /// owned by one task, but it can be cloned to send to other tasks.
 pub struct Sender<T> {
-    priv inner: Flavor<T>,
-    priv sends: Cell<uint>,
+    inner: Flavor<T>,
+    sends: Cell<uint>,
     // can't share in an arc
-    priv marker: marker::NoShare,
+    marker: marker::NoShare,
 }
 
 /// The sending-half of Rust's synchronous channel type. This half can only be
 /// owned by one task, but it can be cloned to send to other tasks.
 pub struct SyncSender<T> {
-    priv inner: UnsafeArc<sync::Packet<T>>,
+    inner: UnsafeArc<sync::Packet<T>>,
     // can't share in an arc
-    priv marker: marker::NoShare,
+    marker: marker::NoShare,
 }
 
 /// This enumeration is the list of the possible reasons that try_recv could not
index 23bbb5a56119e6fce8a5be92199ac425a664188e..84191ed6b28c52475638e6f25f8d2e6ef3c61cfa 100644 (file)
 /// The "receiver set" of the select interface. This structure is used to manage
 /// a set of receivers which are being selected over.
 pub struct Select {
-    priv head: *mut Handle<'static, ()>,
-    priv tail: *mut Handle<'static, ()>,
-    priv next_id: Cell<uint>,
-    priv marker1: marker::NoSend,
+    head: *mut Handle<'static, ()>,
+    tail: *mut Handle<'static, ()>,
+    next_id: Cell<uint>,
+    marker1: marker::NoSend,
 }
 
 /// A handle to a receiver which is currently a member of a `Select` set of
@@ -74,16 +74,16 @@ pub struct Select {
 pub struct Handle<'rx, T> {
     /// The ID of this handle, used to compare against the return value of
     /// `Select::wait()`
-    priv id: uint,
-    priv selector: &'rx Select,
-    priv next: *mut Handle<'static, ()>,
-    priv prev: *mut Handle<'static, ()>,
-    priv added: bool,
-    priv packet: &'rx Packet,
+    id: uint,
+    selector: &'rx Select,
+    next: *mut Handle<'static, ()>,
+    prev: *mut Handle<'static, ()>,
+    added: bool,
+    packet: &'rx Packet,
 
     // due to our fun transmutes, we be sure to place this at the end. (nothing
     // previous relies on T)
-    priv rx: &'rx Receiver<T>,
+    rx: &'rx Receiver<T>,
 }
 
 struct Packets { cur: *mut Handle<'static, ()> }
index c2a6510d6563ad4632844dd7513fece3fc846e15..5f8a043b83036f15df21cd44583983f9df0728be 100644 (file)
@@ -508,20 +508,20 @@ fn main() {
 /// traits.
 pub struct Formatter<'a> {
     /// Flags for formatting (packed version of rt::Flag)
-    flags: uint,
+    pub flags: uint,
     /// Character used as 'fill' whenever there is alignment
-    fill: char,
+    pub fill: char,
     /// Boolean indication of whether the output should be left-aligned
-    align: parse::Alignment,
+    pub align: parse::Alignment,
     /// Optionally specified integer width that the output should be
-    width: Option<uint>,
+    pub width: Option<uint>,
     /// Optionally specified precision for numeric types
-    precision: Option<uint>,
+    pub precision: Option<uint>,
 
     /// Output buffer.
-    buf: &'a mut io::Writer,
-    priv curarg: slice::Items<'a, Argument<'a>>,
-    priv args: &'a [Argument<'a>],
+    pub buf: &'a mut io::Writer,
+    curarg: slice::Items<'a, Argument<'a>>,
+    args: &'a [Argument<'a>],
 }
 
 /// This struct represents the generic "argument" which is taken by the Xprintf
@@ -529,8 +529,8 @@ pub struct Formatter<'a> {
 /// compile time it is ensured that the function and the value have the correct
 /// types, and then this struct is used to canonicalize arguments to one type.
 pub struct Argument<'a> {
-    priv formatter: extern "Rust" fn(&any::Void, &mut Formatter) -> Result,
-    priv value: &'a any::Void,
+    formatter: extern "Rust" fn(&any::Void, &mut Formatter) -> Result,
+    value: &'a any::Void,
 }
 
 impl<'a> Arguments<'a> {
@@ -555,8 +555,8 @@ pub unsafe fn new<'a>(fmt: &'static [rt::Piece<'static>],
 /// string at compile-time so usage of the `write` and `format` functions can
 /// be safely performed.
 pub struct Arguments<'a> {
-    priv fmt: &'a [rt::Piece<'a>],
-    priv args: &'a [Argument<'a>],
+    fmt: &'a [rt::Piece<'a>],
+    args: &'a [Argument<'a>],
 }
 
 /// When a format is not otherwise specified, types are formatted by ascribing
index 4b35a7596c96874353ff3dd10dbff78ca5b5a083..b10a9584df98f7f3dbf59e7a778f78b3be50ba47 100644 (file)
@@ -108,7 +108,7 @@ fn digit(&self, x: u8) -> u8 {
 /// A radix with in the range of `2..36`.
 #[deriving(Clone, Eq)]
 pub struct Radix {
-    priv base: u8,
+    base: u8,
 }
 
 impl Radix {
index 384e2ff2380ef6124933d2bd8894c578da4dafec..4752f3a75f473557133b83ffe14fb09b5bf20bf2 100644 (file)
@@ -37,30 +37,30 @@ pub enum Piece<'a> {
 #[deriving(Eq)]
 pub struct Argument<'a> {
     /// Where to find this argument
-    position: Position<'a>,
+    pub position: Position<'a>,
     /// How to format the argument
-    format: FormatSpec<'a>,
+    pub format: FormatSpec<'a>,
     /// If not `None`, what method to invoke on the argument
-    method: Option<~Method<'a>>
+    pub method: Option<~Method<'a>>
 }
 
 /// Specification for the formatting of an argument in the format string.
 #[deriving(Eq)]
 pub struct FormatSpec<'a> {
     /// Optionally specified character to fill alignment with
-    fill: Option<char>,
+    pub fill: Option<char>,
     /// Optionally specified alignment
-    align: Alignment,
+    pub align: Alignment,
     /// Packed version of various flags provided
-    flags: uint,
+    pub flags: uint,
     /// The integer precision to use
-    precision: Count<'a>,
+    pub precision: Count<'a>,
     /// The string width requested for the resulting format
-    width: Count<'a>,
+    pub width: Count<'a>,
     /// The descriptor string representing the name of the format desired for
     /// this argument, this can be empty or any number of characters, although
     /// it is required to be one word.
-    ty: &'a str
+    pub ty: &'a str
 }
 
 /// Enum describing where an argument for a format can be located.
@@ -154,9 +154,9 @@ pub enum PluralSelector {
 pub struct PluralArm<'a> {
     /// A selector can either be specified by a keyword or with an integer
     /// literal.
-    selector: PluralSelector,
+    pub selector: PluralSelector,
     /// Array of pieces which are the format of this arm
-    result: ~[Piece<'a>],
+    pub result: ~[Piece<'a>],
 }
 
 /// Enum of the 5 CLDR plural keywords. There is one more, "other", but that
@@ -182,9 +182,9 @@ pub enum PluralKeyword {
 #[deriving(Eq)]
 pub struct SelectArm<'a> {
     /// String selector which guards this arm
-    selector: &'a str,
+    pub selector: &'a str,
     /// Array of pieces which are the format of this arm
-    result: ~[Piece<'a>],
+    pub result: ~[Piece<'a>],
 }
 
 /// The parser structure for interpreting the input format string. This is
@@ -194,11 +194,11 @@ pub struct SelectArm<'a> {
 /// This is a recursive-descent parser for the sake of simplicity, and if
 /// necessary there's probably lots of room for improvement performance-wise.
 pub struct Parser<'a> {
-    priv input: &'a str,
-    priv cur: str::CharOffsets<'a>,
-    priv depth: uint,
+    input: &'a str,
+    cur: str::CharOffsets<'a>,
+    depth: uint,
     /// Error messages accumulated during parsing
-    errors: ~[~str],
+    pub errors: ~[~str],
 }
 
 impl<'a> Iterator<Piece<'a>> for Parser<'a> {
index 2a2515754b46c77c69e1b6046489b8ccdd0a3cbd..01c2c06c3fbadb1f2bc8bcf6c81ee86449b46a3b 100644 (file)
@@ -28,17 +28,17 @@ pub enum Piece<'a> {
 }
 
 pub struct Argument<'a> {
-    position: Position,
-    format: FormatSpec,
-    method: Option<&'a Method<'a>>
+    pub position: Position,
+    pub format: FormatSpec,
+    pub method: Option<&'a Method<'a>>
 }
 
 pub struct FormatSpec {
-    fill: char,
-    align: parse::Alignment,
-    flags: uint,
-    precision: Count,
-    width: Count,
+    pub fill: char,
+    pub align: parse::Alignment,
+    pub flags: uint,
+    pub precision: Count,
+    pub width: Count,
 }
 
 pub enum Count {
@@ -60,11 +60,11 @@ pub enum PluralSelector {
 }
 
 pub struct PluralArm<'a> {
-    selector: PluralSelector,
-    result: &'a [Piece<'a>],
+    pub selector: PluralSelector,
+    pub result: &'a [Piece<'a>],
 }
 
 pub struct SelectArm<'a> {
-    selector: &'a str,
-    result: &'a [Piece<'a>],
+    pub selector: &'a str,
+    pub result: &'a [Piece<'a>],
 }
index 06a864f9a10ec141997d6138d332ecf709b2410f..bd383218ba134cc908a34c0aa8abea4435f118a0 100644 (file)
                   task annihilation. For now, cycles need to be broken manually by using `Rc<T>` \
                   with a non-owning `Weak<T>` pointer. A tracing garbage collector is planned."]
 pub struct Gc<T> {
-    priv ptr: @T,
-    priv marker: marker::NoSend,
+    ptr: @T,
+    marker: marker::NoSend,
 }
 
 #[cfg(test)]
 pub struct Gc<T> {
-    priv ptr: @T,
-    priv marker: marker::NoSend,
+    ptr: @T,
+    marker: marker::NoSend,
 }
 
 impl<T: 'static> Gc<T> {
index d448f4eeb37f665cec4f221548aa2288281d1643..d780c30d8508f1061dfc7c534d8cbe2279879ad6 100644 (file)
 
 /// `SipState` computes a SipHash 2-4 hash over a stream of bytes.
 pub struct SipState {
-    priv k0: u64,
-    priv k1: u64,
-    priv length: uint, // how many bytes we've processed
-    priv v0: u64,      // hash state
-    priv v1: u64,
-    priv v2: u64,
-    priv v3: u64,
-    priv tail: [u8, ..8], // unprocessed bytes
-    priv ntail: uint,  // how many bytes in tail are valid
+    k0: u64,
+    k1: u64,
+    length: uint, // how many bytes we've processed
+    v0: u64,      // hash state
+    v1: u64,
+    v2: u64,
+    v3: u64,
+    tail: [u8, ..8], // unprocessed bytes
+    ntail: uint,  // how many bytes in tail are valid
 }
 
 // sadly, these macro definitions can't appear later,
@@ -231,8 +231,8 @@ fn default() -> SipState {
 /// `SipHasher` computes the SipHash algorithm from a stream of bytes.
 #[deriving(Clone)]
 pub struct SipHasher {
-    priv k0: u64,
-    priv k1: u64,
+    k0: u64,
+    k1: u64,
 }
 
 impl SipHasher {
index 988140d38d43d0ce4e0d4539842e219fe0a4d9de..6fe6b3c3639222d24092dddbf9908ba8068e1b5a 100644 (file)
 #[cfg(not(test))]
 pub struct TyDesc {
     // sizeof(T)
-    size: uint,
+    pub size: uint,
 
     // alignof(T)
-    align: uint,
+    pub align: uint,
 
     // Called when a value of type `T` is no longer needed
-    drop_glue: GlueFn,
+    pub drop_glue: GlueFn,
 
     // Called by reflection visitor to visit a value of type `T`
-    visit_glue: GlueFn,
+    pub visit_glue: GlueFn,
 
     // Name corresponding to the type
-    name: &'static str
+    pub name: &'static str,
 }
 
 #[lang="opaque"]
@@ -454,7 +454,7 @@ fn visit_leave_fn(&mut self, purity: uint, proto: uint,
 #[deriving(Eq, Hash, Show, TotalEq)]
 #[cfg(not(test))]
 pub struct TypeId {
-    priv t: u64,
+    t: u64,
 }
 
 #[cfg(not(test))]
index fed47dfcff36636d4abdf5f11f2b34dabbe27a3f..4da297a25fd55cef5b616456d339005b010bb08d 100644 (file)
 /// }
 /// ```
 pub struct BufferedReader<R> {
-    priv inner: R,
-    priv buf: Vec<u8>,
-    priv pos: uint,
-    priv cap: uint,
+    inner: R,
+    buf: Vec<u8>,
+    pos: uint,
+    cap: uint,
 }
 
 impl<R: Reader> BufferedReader<R> {
@@ -135,9 +135,9 @@ fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
 /// writer.flush();
 /// ```
 pub struct BufferedWriter<W> {
-    priv inner: Option<W>,
-    priv buf: Vec<u8>,
-    priv pos: uint
+    inner: Option<W>,
+    buf: Vec<u8>,
+    pos: uint
 }
 
 impl<W: Writer> BufferedWriter<W> {
@@ -220,7 +220,7 @@ fn drop(&mut self) {
 ///
 /// This writer will be flushed when it is dropped.
 pub struct LineBufferedWriter<W> {
-    priv inner: BufferedWriter<W>,
+    inner: BufferedWriter<W>,
 }
 
 impl<W: Writer> LineBufferedWriter<W> {
@@ -303,7 +303,7 @@ fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
 /// }
 /// ```
 pub struct BufferedStream<S> {
-    priv inner: BufferedReader<InternalBufferedWriter<S>>
+    inner: BufferedReader<InternalBufferedWriter<S>>
 }
 
 impl<S: Stream> BufferedStream<S> {
@@ -391,7 +391,7 @@ fn write(&mut self, _: &[u8]) -> io::IoResult<()> { Ok(()) }
 
     /// A dummy reader intended at testing short-reads propagation.
     pub struct ShortReader {
-        priv lengths: ~[uint],
+        lengths: ~[uint],
     }
 
     impl Reader for ShortReader {
index 075c65e04be1520d7b28d287f2805aa5cb143a56..06e020721358bae3aa7e5526f94ff035e8caf548 100644 (file)
 /// }
 /// ```
 pub struct ChanReader {
-    priv buf: Option<~[u8]>,  // A buffer of bytes received but not consumed.
-    priv pos: uint,           // How many of the buffered bytes have already be consumed.
-    priv rx: Receiver<~[u8]>,   // The rx to pull data from.
-    priv closed: bool,        // Whether the pipe this rx connects to has been closed.
+    buf: Option<~[u8]>,  // A buffer of bytes received but not consumed.
+    pos: uint,           // How many of the buffered bytes have already be consumed.
+    rx: Receiver<~[u8]>,   // The rx to pull data from.
+    closed: bool,        // Whether the pipe this rx connects to has been closed.
 }
 
 impl ChanReader {
@@ -98,7 +98,7 @@ fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
 /// writer.write("hello, world".as_bytes());
 /// ```
 pub struct ChanWriter {
-    priv tx: Sender<~[u8]>,
+    tx: Sender<~[u8]>,
 }
 
 impl ChanWriter {
index 0275d9ba8d943c64b4da9239dd56a6eead0883b6..a9fe3be585ccdc09471b2609cc12973036653bdb 100644 (file)
@@ -38,7 +38,7 @@
 /// Any error other than `EndOfFile` that is produced by the underlying Reader
 /// is returned by the iterator and should be handled by the caller.
 pub struct Bytes<'r, T> {
-    priv reader: &'r mut T,
+    reader: &'r mut T,
 }
 
 impl<'r, R: Reader> Bytes<'r, R> {
index 020f493e24b9f80c283bd83dd1d4378abdd8ac26..b6efdfad9d3a8127cd11aaca13c2e7b6b0c49d56 100644 (file)
@@ -78,9 +78,9 @@
 /// configured at creation time, via the `FileAccess` parameter to
 /// `File::open_mode()`.
 pub struct File {
-    priv fd: ~RtioFileStream:Send,
-    priv path: Path,
-    priv last_nread: int,
+    fd: ~RtioFileStream:Send,
+    path: Path,
+    last_nread: int,
 }
 
 impl File {
@@ -498,7 +498,7 @@ pub fn walk_dir(path: &Path) -> IoResult<Directories> {
 
 /// An iterator which walks over a directory
 pub struct Directories {
-    priv stack: ~[Path],
+    stack: ~[Path],
 }
 
 impl Iterator<Path> for Directories {
index 7ae717cfccf971c0bb059a8b93db298c5dac8127..e9c6b5b01da90e40966dc6a020ed9c388841a9bf 100644 (file)
@@ -52,8 +52,8 @@ fn combine(seek: SeekStyle, cur: uint, end: uint, offset: i64) -> IoResult<u64>
 /// assert_eq!(w.unwrap(), ~[0, 1, 2]);
 /// ```
 pub struct MemWriter {
-    priv buf: ~[u8],
-    priv pos: uint,
+    buf: ~[u8],
+    pos: uint,
 }
 
 impl MemWriter {
@@ -132,8 +132,8 @@ fn seek(&mut self, pos: i64, style: SeekStyle) -> IoResult<()> {
 /// assert_eq!(r.read_to_end().unwrap(), ~[0, 1, 2]);
 /// ```
 pub struct MemReader {
-    priv buf: ~[u8],
-    priv pos: uint
+    buf: ~[u8],
+    pos: uint
 }
 
 impl MemReader {
@@ -219,8 +219,8 @@ fn fill_buf<'a>(&'a mut self) -> IoResult<&'a [u8]> {
 /// assert!(buf == [0, 1, 2, 0]);
 /// ```
 pub struct BufWriter<'a> {
-    priv buf: &'a mut [u8],
-    priv pos: uint
+    buf: &'a mut [u8],
+    pos: uint
 }
 
 impl<'a> BufWriter<'a> {
@@ -275,8 +275,8 @@ fn seek(&mut self, pos: i64, style: SeekStyle) -> IoResult<()> {
 /// assert_eq!(r.read_to_end().unwrap(), ~[0, 1, 2, 3]);
 /// ```
 pub struct BufReader<'a> {
-    priv buf: &'a [u8],
-    priv pos: uint
+    buf: &'a [u8],
+    pos: uint
 }
 
 impl<'a> BufReader<'a> {
index c1833e6b116aa89c086b267166f93cb92a053988..50f8b0b28c4c05ad1ae43c1ee0441e80c72a73e8 100644 (file)
@@ -283,11 +283,11 @@ fn file_product(p: &Path) -> IoResult<u32> {
 pub struct IoError {
     /// An enumeration which can be matched against for determining the flavor
     /// of error.
-    kind: IoErrorKind,
+    pub kind: IoErrorKind,
     /// A human-readable description about the error
-    desc: &'static str,
+    pub desc: &'static str,
     /// Detailed information about this error, not always available
-    detail: Option<~str>
+    pub detail: Option<~str>
 }
 
 impl fmt::Show for IoError {
@@ -1023,7 +1023,7 @@ impl<T: Reader + Writer> Stream for T {}
 /// Any error other than `EndOfFile` that is produced by the underlying Reader
 /// is returned by the iterator and should be handled by the caller.
 pub struct Lines<'r, T> {
-    priv buffer: &'r mut T,
+    buffer: &'r mut T,
 }
 
 impl<'r, T: Buffer> Iterator<IoResult<~str>> for Lines<'r, T> {
@@ -1050,7 +1050,7 @@ fn next(&mut self) -> Option<IoResult<~str>> {
 /// Any error other than `EndOfFile` that is produced by the underlying Reader
 /// is returned by the iterator and should be handled by the caller.
 pub struct Chars<'r, T> {
-    priv buffer: &'r mut T
+    buffer: &'r mut T
 }
 
 impl<'r, T: Buffer> Iterator<IoResult<char>> for Chars<'r, T> {
@@ -1290,7 +1290,7 @@ fn incoming<'r>(&'r mut self) -> IncomingConnections<'r, Self> {
 /// connection attempt was successful.  A successful connection will be wrapped
 /// in `Ok`. A failed connection is represented as an `Err`.
 pub struct IncomingConnections<'a, A> {
-    priv inc: &'a mut A,
+    inc: &'a mut A,
 }
 
 impl<'a, T, A: Acceptor<T>> Iterator<IoResult<T>> for IncomingConnections<'a, A> {
@@ -1389,13 +1389,13 @@ pub enum FileType {
 #[deriving(Hash)]
 pub struct FileStat {
     /// The path that this stat structure is describing
-    path: Path,
+    pub path: Path,
     /// The size of the file, in bytes
-    size: u64,
+    pub size: u64,
     /// The kind of file this path points to (directory, file, pipe, etc.)
-    kind: FileType,
+    pub kind: FileType,
     /// The file permissions currently on the file
-    perm: FilePermission,
+    pub perm: FilePermission,
 
     // FIXME(#10301): These time fields are pretty useless without an actual
     //                time representation, what are the milliseconds relative
@@ -1403,13 +1403,13 @@ pub struct FileStat {
 
     /// The time that the file was created at, in platform-dependent
     /// milliseconds
-    created: u64,
+    pub created: u64,
     /// The time that this file was last modified, in platform-dependent
     /// milliseconds
-    modified: u64,
+    pub modified: u64,
     /// The time that this file was last accessed, in platform-dependent
     /// milliseconds
-    accessed: u64,
+    pub accessed: u64,
 
     /// Information returned by stat() which is not guaranteed to be
     /// platform-independent. This information may be useful on some platforms,
@@ -1419,7 +1419,7 @@ pub struct FileStat {
     /// Usage of this field is discouraged, but if access is desired then the
     /// fields are located here.
     #[unstable]
-    unstable: UnstableFileStat,
+    pub unstable: UnstableFileStat,
 }
 
 /// This structure represents all of the possible information which can be
@@ -1430,25 +1430,25 @@ pub struct FileStat {
 #[deriving(Hash)]
 pub struct UnstableFileStat {
     /// The ID of the device containing the file.
-    device: u64,
+    pub device: u64,
     /// The file serial number.
-    inode: u64,
+    pub inode: u64,
     /// The device ID.
-    rdev: u64,
+    pub rdev: u64,
     /// The number of hard links to this file.
-    nlink: u64,
+    pub nlink: u64,
     /// The user ID of the file.
-    uid: u64,
+    pub uid: u64,
     /// The group ID of the file.
-    gid: u64,
+    pub gid: u64,
     /// The optimal block size for I/O.
-    blksize: u64,
+    pub blksize: u64,
     /// The blocks allocated for this file.
-    blocks: u64,
+    pub blocks: u64,
     /// User-defined flags for the file.
-    flags: u64,
+    pub flags: u64,
     /// The file generation number.
-    gen: u64,
+    pub gen: u64,
 }
 
 /// A set of permissions for a file or directory is represented by a set of
index bf573bfaed876d977f4278aa8af44635a9b33738..4006665e886c6a3d671db65d70648e229dc180e1 100644 (file)
@@ -57,18 +57,18 @@ pub enum Protocol {
 /// For details on these fields, see their corresponding definitions via
 /// `man -s 3 getaddrinfo`
 pub struct Hint {
-    family: uint,
-    socktype: Option<SocketType>,
-    protocol: Option<Protocol>,
-    flags: uint,
+    pub family: uint,
+    pub socktype: Option<SocketType>,
+    pub protocol: Option<Protocol>,
+    pub flags: uint,
 }
 
 pub struct Info {
-    address: SocketAddr,
-    family: uint,
-    socktype: Option<SocketType>,
-    protocol: Option<Protocol>,
-    flags: uint,
+    pub address: SocketAddr,
+    pub family: uint,
+    pub socktype: Option<SocketType>,
+    pub protocol: Option<Protocol>,
+    pub flags: uint,
 }
 
 /// Easy name resolution. Given a hostname, returns the list of IP addresses for
index 8cb205ab67e7c453bc2de7ff42f3cc104b4a16e2..10e1ffacd951b0ca47111ac20818730705280f66 100644 (file)
@@ -58,8 +58,8 @@ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
 
 #[deriving(Eq, TotalEq, Clone, Hash)]
 pub struct SocketAddr {
-    ip: IpAddr,
-    port: Port,
+    pub ip: IpAddr,
+    pub port: Port,
 }
 
 impl fmt::Show for SocketAddr {
index 61943eb3d6fb800ec56016c8555f77c140b97932..b4dcd204479a41c08e396ae4e86aa3774d7d9dd6 100644 (file)
@@ -17,8 +17,6 @@
 //! A TCP connection implements the `Reader` and `Writer` traits, while the TCP
 //! listener (socket server) implements the `Listener` and `Acceptor` traits.
 
-#![deny(missing_doc)]
-
 use clone::Clone;
 use io::IoResult;
 use io::net::ip::SocketAddr;
@@ -46,7 +44,7 @@
 /// drop(stream); // close the connection
 /// ```
 pub struct TcpStream {
-    priv obj: ~RtioTcpStream:Send
+    obj: ~RtioTcpStream:Send
 }
 
 impl TcpStream {
@@ -128,7 +126,7 @@ fn write(&mut self, buf: &[u8]) -> IoResult<()> { self.obj.write(buf) }
 /// # }
 /// ```
 pub struct TcpListener {
-    priv obj: ~RtioTcpListener:Send
+    obj: ~RtioTcpListener:Send
 }
 
 impl TcpListener {
@@ -161,7 +159,7 @@ fn listen(self) -> IoResult<TcpAcceptor> {
 /// a `TcpListener`'s `listen` method, and this object can be used to accept new
 /// `TcpStream` instances.
 pub struct TcpAcceptor {
-    priv obj: ~RtioTcpAcceptor:Send
+    obj: ~RtioTcpAcceptor:Send
 }
 
 impl Acceptor<TcpStream> for TcpAcceptor {
index 8169fc1a917094320ea051ee9b3879093808041c..8dd59e859b877dddace4b86e7157df95f60c95f0 100644 (file)
@@ -54,7 +54,7 @@
 /// drop(socket); // close the socket
 /// ```
 pub struct UdpSocket {
-    priv obj: ~RtioUdpSocket:Send
+    obj: ~RtioUdpSocket:Send
 }
 
 impl UdpSocket {
@@ -115,8 +115,8 @@ fn clone(&self) -> UdpSocket {
 /// A type that allows convenient usage of a UDP stream connected to one
 /// address via the `Reader` and `Writer` traits.
 pub struct UdpStream {
-    priv socket: UdpSocket,
-    priv connected_to: SocketAddr
+    socket: UdpSocket,
+    connected_to: SocketAddr
 }
 
 impl UdpStream {
index 73bb6b56298267cb9abdb0db45c27e0726f9286b..0d64a7b141ec6c06fd521c0a405b363cef665fb5 100644 (file)
@@ -36,7 +36,7 @@
 
 /// A stream which communicates over a named pipe.
 pub struct UnixStream {
-    priv obj: PipeStream,
+    obj: PipeStream,
 }
 
 impl UnixStream {
@@ -83,7 +83,7 @@ fn write(&mut self, buf: &[u8]) -> IoResult<()> { self.obj.write(buf) }
 /// A value that can listen for incoming named pipe connection requests.
 pub struct UnixListener {
     /// The internal, opaque runtime Unix listener.
-    priv obj: ~RtioUnixListener:Send,
+    obj: ~RtioUnixListener:Send,
 }
 
 impl UnixListener {
@@ -125,7 +125,7 @@ fn listen(self) -> IoResult<UnixAcceptor> {
 /// A value that can accept named pipe connections, returned from `listen()`.
 pub struct UnixAcceptor {
     /// The internal, opaque runtime Unix acceptor.
-    priv obj: ~RtioUnixAcceptor:Send,
+    obj: ~RtioUnixAcceptor:Send,
 }
 
 impl Acceptor<UnixStream> for UnixAcceptor {
index 43b53ca95dce611d4c26989d655957ca25133c2a..75ec3d8614e8293ab150ba5c2fc2891afff7bffb 100644 (file)
@@ -23,7 +23,7 @@
 /// A synchronous, in-memory pipe.
 pub struct PipeStream {
     /// The internal, opaque runtime pipe object.
-    priv obj: ~RtioPipe:Send,
+    obj: ~RtioPipe:Send,
 }
 
 impl PipeStream {
index 0ce35018a9c6239c45b59eb001afe6f1ea327454..1f067021825dbcdb38db975a91162a29eedbd5ca 100644 (file)
@@ -10,8 +10,6 @@
 
 //! Bindings for executing child processes
 
-#![deny(missing_doc)]
-
 use prelude::*;
 
 use fmt;
 /// assert!(child.wait().success());
 /// ```
 pub struct Process {
-    priv handle: ~RtioProcess:Send,
+    handle: ~RtioProcess:Send,
 
     /// Handle to the child's stdin, if the `stdin` field of this process's
     /// `ProcessConfig` was `CreatePipe`. By default, this handle is `Some`.
-    stdin: Option<io::PipeStream>,
+    pub stdin: Option<io::PipeStream>,
 
     /// Handle to the child's stdout, if the `stdout` field of this process's
     /// `ProcessConfig` was `CreatePipe`. By default, this handle is `Some`.
-    stdout: Option<io::PipeStream>,
+    pub stdout: Option<io::PipeStream>,
 
     /// Handle to the child's stderr, if the `stderr` field of this process's
     /// `ProcessConfig` was `CreatePipe`. By default, this handle is `Some`.
-    stderr: Option<io::PipeStream>,
+    pub stderr: Option<io::PipeStream>,
 
     /// Extra I/O handles as configured by the original `ProcessConfig` when
     /// this process was created. This is by default empty.
-    extra_io: ~[Option<io::PipeStream>],
+    pub extra_io: ~[Option<io::PipeStream>],
 }
 
 /// This configuration describes how a new process should be spawned. A blank
@@ -88,33 +86,33 @@ pub struct Process {
 /// ```
 pub struct ProcessConfig<'a> {
     /// Path to the program to run
-    program: &'a str,
+    pub program: &'a str,
 
     /// Arguments to pass to the program (doesn't include the program itself)
-    args: &'a [~str],
+    pub args: &'a [~str],
 
     /// Optional environment to specify for the program. If this is None, then
     /// it will inherit the current process's environment.
-    env: Option<&'a [(~str, ~str)]>,
+    pub env: Option<&'a [(~str, ~str)]>,
 
     /// Optional working directory for the new process. If this is None, then
     /// the current directory of the running process is inherited.
-    cwd: Option<&'a Path>,
+    pub cwd: Option<&'a Path>,
 
     /// Configuration for the child process's stdin handle (file descriptor 0).
     /// This field defaults to `CreatePipe(true, false)` so the input can be
     /// written to.
-    stdin: StdioContainer,
+    pub stdin: StdioContainer,
 
     /// Configuration for the child process's stdout handle (file descriptor 1).
     /// This field defaults to `CreatePipe(false, true)` so the output can be
     /// collected.
-    stdout: StdioContainer,
+    pub stdout: StdioContainer,
 
     /// Configuration for the child process's stdout handle (file descriptor 2).
     /// This field defaults to `CreatePipe(false, true)` so the output can be
     /// collected.
-    stderr: StdioContainer,
+    pub stderr: StdioContainer,
 
     /// Any number of streams/file descriptors/pipes may be attached to this
     /// process. This list enumerates the file descriptors and such for the
@@ -122,31 +120,31 @@ pub struct ProcessConfig<'a> {
     /// 3 and go to the length of this array. The first three file descriptors
     /// (stdin/stdout/stderr) are configured with the `stdin`, `stdout`, and
     /// `stderr` fields.
-    extra_io: &'a [StdioContainer],
+    pub extra_io: &'a [StdioContainer],
 
     /// Sets the child process's user id. This translates to a `setuid` call in
     /// the child process. Setting this value on windows will cause the spawn to
     /// fail. Failure in the `setuid` call on unix will also cause the spawn to
     /// fail.
-    uid: Option<uint>,
+    pub uid: Option<uint>,
 
     /// Similar to `uid`, but sets the group id of the child process. This has
     /// the same semantics as the `uid` field.
-    gid: Option<uint>,
+    pub gid: Option<uint>,
 
     /// If true, the child process is spawned in a detached state. On unix, this
     /// means that the child is the leader of a new process group.
-    detach: bool,
+    pub detach: bool,
 }
 
 /// The output of a finished process.
 pub struct ProcessOutput {
     /// The status (exit code) of the process.
-    status: ProcessExit,
+    pub status: ProcessExit,
     /// The data that the process wrote to stdout.
-    output: ~[u8],
+    pub output: ~[u8],
     /// The data that the process wrote to stderr.
-    error: ~[u8],
+    pub error: ~[u8],
 }
 
 /// Describes what to do with a standard io stream for a child process.
index d6700fda23d0c2e643b40880e788899e21584655..494cc6f6b02d4c9c7565d07567b0b4067bd775cb 100644 (file)
@@ -81,15 +81,15 @@ pub enum Signum {
 /// ```
 pub struct Listener {
     /// A map from signums to handles to keep the handles in memory
-    priv handles: ~[(Signum, ~RtioSignal)],
+    handles: ~[(Signum, ~RtioSignal)],
     /// This is where all the handles send signums, which are received by
     /// the clients from the receiver.
-    priv tx: Sender<Signum>,
+    tx: Sender<Signum>,
 
     /// Clients of Listener can `recv()` on this receiver. This is exposed to
     /// allow selection over it as well as manipulation of the receiver
     /// directly.
-    rx: Receiver<Signum>,
+    pub rx: Receiver<Signum>,
 }
 
 impl Listener {
index e52df0425614acde25add32a79dc70ad409b6569..ae98333ca9614b2aa85f158977585000f045a09d 100644 (file)
@@ -293,7 +293,7 @@ pub fn println_args(fmt: &fmt::Arguments) {
 
 /// Representation of a reader of a standard input stream
 pub struct StdReader {
-    priv inner: StdSource
+    inner: StdSource
 }
 
 impl Reader for StdReader {
@@ -322,7 +322,7 @@ fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
 
 /// Representation of a writer to a standard output stream
 pub struct StdWriter {
-    priv inner: StdSource
+    inner: StdSource
 }
 
 impl StdWriter {
index 34d6b19199a7140f302bd3d3e241cadbc57d1a62..4ff1c7faaece2821d8c38ee4c7f2145dfb7ad236 100644 (file)
@@ -24,7 +24,7 @@
 /// A wrapper for a path to temporary directory implementing automatic
 /// scope-based deletion.
 pub struct TempDir {
-    priv path: Option<Path>
+    path: Option<Path>
 }
 
 impl TempDir {
index 6840c418a9b03fc5d296788443bcf1c898e05970..839fcab8f86a4308c66d2d6f0f291b54cb1ff91f 100644 (file)
@@ -63,7 +63,7 @@
 /// # }
 /// ```
 pub struct Timer {
-    priv obj: ~RtioTimer:Send,
+    obj: ~RtioTimer:Send,
 }
 
 /// Sleep the current task for `msecs` milliseconds.
index 2df0dec2d134a3a3557e87127e577957d8fe4058..a294ba17289ca498c377783f7eb2a8e1fde1bd15 100644 (file)
@@ -17,8 +17,8 @@
 
 /// Wraps a `Reader`, limiting the number of bytes that can be read from it.
 pub struct LimitReader<R> {
-    priv limit: uint,
-    priv inner: R
+    limit: uint,
+    inner: R
 }
 
 impl<R: Reader> LimitReader<R> {
@@ -85,7 +85,7 @@ fn read(&mut self, _buf: &mut [u8]) -> io::IoResult<uint> {
 
 /// A `Writer` which multiplexes writes to a set of `Writers`.
 pub struct MultiWriter {
-    priv writers: ~[~Writer]
+    writers: ~[~Writer]
 }
 
 impl MultiWriter {
@@ -118,8 +118,8 @@ fn flush(&mut self) -> io::IoResult<()> {
 /// A `Reader` which chains input from multiple `Readers`, reading each to
 /// completion before moving onto the next.
 pub struct ChainedReader<I, R> {
-    priv readers: I,
-    priv cur_reader: Option<R>,
+    readers: I,
+    cur_reader: Option<R>,
 }
 
 impl<R: Reader, I: Iterator<R>> ChainedReader<I, R> {
@@ -156,8 +156,8 @@ fn read(&mut self, buf: &mut [u8]) -> io::IoResult<uint> {
 /// A `Reader` which forwards input from another `Reader`, passing it along to
 /// a `Writer` as well. Similar to the `tee(1)` command.
 pub struct TeeReader<R, W> {
-    priv reader: R,
-    priv writer: W
+    reader: R,
+    writer: W,
 }
 
 impl<R: Reader, W: Writer> TeeReader<R, W> {
index 3e3766f1c11002dd8f50371f6b48a67a516dc32d..d7424fc9f61a1eaad347b7a9b9c702d1659cd121 100644 (file)
@@ -751,7 +751,7 @@ impl<A, B, T: ExactSize<A>, U: ExactSize<B>> ExactSize<(A, B)> for Zip<T, U> {}
 /// An double-ended iterator with the direction inverted
 #[deriving(Clone)]
 pub struct Rev<T> {
-    priv iter: T
+    iter: T
 }
 
 impl<A, T: DoubleEndedIterator<A>> Iterator<A> for Rev<T> {
@@ -778,7 +778,7 @@ fn idx(&self, index: uint) -> Option<A> {
 
 /// A mutable reference to an iterator
 pub struct ByRef<'a, T> {
-    priv iter: &'a mut T
+    iter: &'a mut T
 }
 
 impl<'a, A, T: Iterator<A>> Iterator<A> for ByRef<'a, T> {
@@ -1036,8 +1036,8 @@ fn cycle(self) -> Cycle<T> {
 /// An iterator that repeats endlessly
 #[deriving(Clone)]
 pub struct Cycle<T> {
-    priv orig: T,
-    priv iter: T,
+    orig: T,
+    iter: T,
 }
 
 impl<A, T: Clone + Iterator<A>> Iterator<A> for Cycle<T> {
@@ -1087,9 +1087,9 @@ fn idx(&self, index: uint) -> Option<A> {
 /// An iterator which strings two iterators together
 #[deriving(Clone)]
 pub struct Chain<T, U> {
-    priv a: T,
-    priv b: U,
-    priv flag: bool
+    a: T,
+    b: U,
+    flag: bool
 }
 
 impl<A, T: Iterator<A>, U: Iterator<A>> Iterator<A> for Chain<T, U> {
@@ -1156,8 +1156,8 @@ fn idx(&self, index: uint) -> Option<A> {
 /// An iterator which iterates two other iterators simultaneously
 #[deriving(Clone)]
 pub struct Zip<T, U> {
-    priv a: T,
-    priv b: U
+    a: T,
+    b: U
 }
 
 impl<A, B, T: Iterator<A>, U: Iterator<B>> Iterator<(A, B)> for Zip<T, U> {
@@ -1234,8 +1234,8 @@ fn idx(&self, index: uint) -> Option<(A, B)> {
 
 /// An iterator which maps the values of `iter` with `f`
 pub struct Map<'a, A, B, T> {
-    priv iter: T,
-    priv f: 'a |A| -> B
+    iter: T,
+    f: 'a |A| -> B
 }
 
 impl<'a, A, B, T> Map<'a, A, B, T> {
@@ -1283,8 +1283,8 @@ fn idx(&self, index: uint) -> Option<B> {
 
 /// An iterator which filters the elements of `iter` with `predicate`
 pub struct Filter<'a, A, T> {
-    priv iter: T,
-    priv predicate: 'a |&A| -> bool
+    iter: T,
+    predicate: 'a |&A| -> bool
 }
 
 impl<'a, A, T: Iterator<A>> Iterator<A> for Filter<'a, A, T> {
@@ -1327,8 +1327,8 @@ fn next_back(&mut self) -> Option<A> {
 
 /// An iterator which uses `f` to both filter and map elements from `iter`
 pub struct FilterMap<'a, A, B, T> {
-    priv iter: T,
-    priv f: 'a |A| -> Option<B>
+    iter: T,
+    f: 'a |A| -> Option<B>
 }
 
 impl<'a, A, B, T: Iterator<A>> Iterator<B> for FilterMap<'a, A, B, T> {
@@ -1371,8 +1371,8 @@ fn next_back(&mut self) -> Option<B> {
 /// An iterator which yields the current count and the element during iteration
 #[deriving(Clone)]
 pub struct Enumerate<T> {
-    priv iter: T,
-    priv count: uint
+    iter: T,
+    count: uint
 }
 
 impl<A, T: Iterator<A>> Iterator<(uint, A)> for Enumerate<T> {
@@ -1425,8 +1425,8 @@ fn idx(&self, index: uint) -> Option<(uint, A)> {
 
 /// An iterator with a `peek()` that returns an optional reference to the next element.
 pub struct Peekable<A, T> {
-    priv iter: T,
-    priv peeked: Option<A>,
+    iter: T,
+    peeked: Option<A>,
 }
 
 impl<A, T: Iterator<A>> Iterator<A> for Peekable<A, T> {
@@ -1475,9 +1475,9 @@ pub fn is_empty(&mut self) -> bool {
 
 /// An iterator which rejects elements while `predicate` is true
 pub struct SkipWhile<'a, A, T> {
-    priv iter: T,
-    priv flag: bool,
-    priv predicate: 'a |&A| -> bool
+    iter: T,
+    flag: bool,
+    predicate: 'a |&A| -> bool
 }
 
 impl<'a, A, T: Iterator<A>> Iterator<A> for SkipWhile<'a, A, T> {
@@ -1513,9 +1513,9 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 
 /// An iterator which only accepts elements while `predicate` is true
 pub struct TakeWhile<'a, A, T> {
-    priv iter: T,
-    priv flag: bool,
-    priv predicate: 'a |&A| -> bool
+    iter: T,
+    flag: bool,
+    predicate: 'a |&A| -> bool
 }
 
 impl<'a, A, T: Iterator<A>> Iterator<A> for TakeWhile<'a, A, T> {
@@ -1548,8 +1548,8 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 /// An iterator which skips over `n` elements of `iter`.
 #[deriving(Clone)]
 pub struct Skip<T> {
-    priv iter: T,
-    priv n: uint
+    iter: T,
+    n: uint
 }
 
 impl<A, T: Iterator<A>> Iterator<A> for Skip<T> {
@@ -1612,8 +1612,8 @@ fn idx(&self, index: uint) -> Option<A> {
 /// An iterator which only iterates over the first `n` iterations of `iter`.
 #[deriving(Clone)]
 pub struct Take<T> {
-    priv iter: T,
-    priv n: uint
+    iter: T,
+    n: uint
 }
 
 impl<A, T: Iterator<A>> Iterator<A> for Take<T> {
@@ -1661,11 +1661,11 @@ fn idx(&self, index: uint) -> Option<A> {
 
 /// An iterator to maintain state while iterating another iterator
 pub struct Scan<'a, A, B, T, St> {
-    priv iter: T,
-    priv f: 'a |&mut St, A| -> Option<B>,
+    iter: T,
+    f: 'a |&mut St, A| -> Option<B>,
 
     /// The current internal state to be passed to the closure next.
-    state: St
+    pub state: St,
 }
 
 impl<'a, A, B, T: Iterator<A>, St> Iterator<B> for Scan<'a, A, B, T, St> {
@@ -1685,10 +1685,10 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 /// and yields the elements of the produced iterators
 ///
 pub struct FlatMap<'a, A, T, U> {
-    priv iter: T,
-    priv f: 'a |A| -> U,
-    priv frontiter: Option<U>,
-    priv backiter: Option<U>,
+    iter: T,
+    f: 'a |A| -> U,
+    frontiter: Option<U>,
+    backiter: Option<U>,
 }
 
 impl<'a, A, T: Iterator<A>, B, U: Iterator<B>> Iterator<B> for FlatMap<'a, A, T, U> {
@@ -1744,8 +1744,8 @@ fn next_back(&mut self) -> Option<B> {
 /// yields `None` once.
 #[deriving(Clone)]
 pub struct Fuse<T> {
-    priv iter: T,
-    priv done: bool
+    iter: T,
+    done: bool
 }
 
 impl<A, T: Iterator<A>> Iterator<A> for Fuse<T> {
@@ -1816,8 +1816,8 @@ pub fn reset_fuse(&mut self) {
 /// An iterator that calls a function with a reference to each
 /// element before yielding it.
 pub struct Inspect<'a, A, T> {
-    priv iter: T,
-    priv f: 'a |&A|
+    iter: T,
+    f: 'a |&A|
 }
 
 impl<'a, A, T> Inspect<'a, A, T> {
@@ -1869,9 +1869,9 @@ fn idx(&self, index: uint) -> Option<A> {
 
 /// An iterator which just modifies the contained state throughout iteration.
 pub struct Unfold<'a, A, St> {
-    priv f: 'a |&mut St| -> Option<A>,
+    f: 'a |&mut St| -> Option<A>,
     /// Internal state that will be yielded on the next iteration
-    state: St
+    pub state: St,
 }
 
 impl<'a, A, St> Unfold<'a, A, St> {
@@ -1905,9 +1905,9 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 #[deriving(Clone)]
 pub struct Counter<A> {
     /// The current state the counter is at (next value to be yielded)
-    priv state: A,
+    state: A,
     /// The amount that this iterator is stepping by
-    priv step: A
+    step: A,
 }
 
 /// Creates a new counter with the specified start/step
@@ -1933,9 +1933,9 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 /// An iterator over the range [start, stop)
 #[deriving(Clone)]
 pub struct Range<A> {
-    priv state: A,
-    priv stop: A,
-    priv one: A
+    state: A,
+    stop: A,
+    one: A
 }
 
 /// Return an iterator over the range [start, stop)
@@ -2007,8 +2007,8 @@ fn next_back(&mut self) -> Option<A> {
 /// An iterator over the range [start, stop]
 #[deriving(Clone)]
 pub struct RangeInclusive<A> {
-    priv range: Range<A>,
-    priv done: bool
+    range: Range<A>,
+    done: bool,
 }
 
 /// Return an iterator over the range [start, stop]
@@ -2070,10 +2070,10 @@ fn next_back(&mut self) -> Option<A> {
 /// An iterator over the range [start, stop) by `step`. It handles overflow by stopping.
 #[deriving(Clone)]
 pub struct RangeStep<A> {
-    priv state: A,
-    priv stop: A,
-    priv step: A,
-    priv rev: bool
+    state: A,
+    stop: A,
+    step: A,
+    rev: bool,
 }
 
 /// Return an iterator over the range [start, stop) by `step`. It handles overflow by stopping.
@@ -2102,11 +2102,11 @@ fn next(&mut self) -> Option<A> {
 /// An iterator over the range [start, stop] by `step`. It handles overflow by stopping.
 #[deriving(Clone)]
 pub struct RangeStepInclusive<A> {
-    priv state: A,
-    priv stop: A,
-    priv step: A,
-    priv rev: bool,
-    priv done: bool
+    state: A,
+    stop: A,
+    step: A,
+    rev: bool,
+    done: bool,
 }
 
 /// Return an iterator over the range [start, stop] by `step`. It handles overflow by stopping.
@@ -2137,7 +2137,7 @@ fn next(&mut self) -> Option<A> {
 /// An iterator that repeats an element endlessly
 #[deriving(Clone)]
 pub struct Repeat<A> {
-    priv element: A
+    element: A
 }
 
 impl<A: Clone> Repeat<A> {
index 76aa0d425482cc222f00fec58ac3821aa4e7bf2a..f9827d7fa59a73415b6ee4b270e70e79aedff396 100644 (file)
@@ -193,7 +193,7 @@ pub mod marker {
     /// "interior" mutability:
     ///
     /// ```
-    /// pub struct Cell<T> { priv value: T }
+    /// pub struct Cell<T> { value: T }
     /// # fn main() {}
     /// ```
     ///
index c130b89b6d455f039d53cdd56974e226f8a879f0..ab75031e914f7537ebeca16f58240a38d7d31d17 100644 (file)
@@ -57,7 +57,9 @@
 // Don't link to std. We are std.
 #![no_std]
 
-#![deny(missing_doc)]
+// #![deny(missing_doc)] // NOTE: uncomment after a stage0 snap
+#![allow(missing_doc)] // NOTE: remove after a stage0 snap
+#![allow(visible_private_types)] // NOTE: remove after a stage0 snap
 
 // When testing libstd, bring in libuv as the I/O backend so tests can print
 // things and all of the std::io tests have an I/O interface to run on top
index a310b95a21351219928da9466ed89f4dc7af3632..52e01f4dbfda9422e1774912b53f650a8fc21633 100644 (file)
@@ -244,25 +244,25 @@ pub mod posix01 {
                 pub type pthread_t = c_ulong;
 
                 pub struct glob_t {
-                    gl_pathc: size_t,
-                    gl_pathv: **c_char,
-                    gl_offs:  size_t,
-
-                    __unused1: *c_void,
-                    __unused2: *c_void,
-                    __unused3: *c_void,
-                    __unused4: *c_void,
-                    __unused5: *c_void,
+                    pub gl_pathc: size_t,
+                    pub gl_pathv: **c_char,
+                    pub gl_offs:  size_t,
+
+                    pub __unused1: *c_void,
+                    pub __unused2: *c_void,
+                    pub __unused3: *c_void,
+                    pub __unused4: *c_void,
+                    pub __unused5: *c_void,
                 }
 
                 pub struct timeval {
-                    tv_sec: time_t,
-                    tv_usec: suseconds_t,
+                    pub tv_sec: time_t,
+                    pub tv_usec: suseconds_t,
                 }
 
                 pub struct timespec {
-                    tv_sec: time_t,
-                    tv_nsec: c_long,
+                    pub tv_sec: time_t,
+                    pub tv_nsec: c_long,
                 }
 
                 pub enum timezone {}
@@ -277,54 +277,54 @@ pub mod bsd44 {
                 pub type in_port_t = u16;
                 pub type in_addr_t = u32;
                 pub struct sockaddr {
-                    sa_family: sa_family_t,
-                    sa_data: [u8, ..14],
+                    pub sa_family: sa_family_t,
+                    pub sa_data: [u8, ..14],
                 }
                 pub struct sockaddr_storage {
-                    ss_family: sa_family_t,
-                    __ss_align: i64,
-                    __ss_pad2: [u8, ..112],
+                    pub ss_family: sa_family_t,
+                    pub __ss_align: i64,
+                    pub __ss_pad2: [u8, ..112],
                 }
                 pub struct sockaddr_in {
-                    sin_family: sa_family_t,
-                    sin_port: in_port_t,
-                    sin_addr: in_addr,
-                    sin_zero: [u8, ..8],
+                    pub sin_family: sa_family_t,
+                    pub sin_port: in_port_t,
+                    pub sin_addr: in_addr,
+                    pub sin_zero: [u8, ..8],
                 }
                 pub struct in_addr {
-                    s_addr: in_addr_t,
+                    pub s_addr: in_addr_t,
                 }
                 pub struct sockaddr_in6 {
-                    sin6_family: sa_family_t,
-                    sin6_port: in_port_t,
-                    sin6_flowinfo: u32,
-                    sin6_addr: in6_addr,
-                    sin6_scope_id: u32,
+                    pub sin6_family: sa_family_t,
+                    pub sin6_port: in_port_t,
+                    pub sin6_flowinfo: u32,
+                    pub sin6_addr: in6_addr,
+                    pub sin6_scope_id: u32,
                 }
                 pub struct in6_addr {
-                    s6_addr: [u16, ..8]
+                    pub s6_addr: [u16, ..8]
                 }
                 pub struct ip_mreq {
-                    imr_multiaddr: in_addr,
-                    imr_interface: in_addr,
+                    pub imr_multiaddr: in_addr,
+                    pub imr_interface: in_addr,
                 }
                 pub struct ip6_mreq {
-                    ipv6mr_multiaddr: in6_addr,
-                    ipv6mr_interface: c_uint,
+                    pub ipv6mr_multiaddr: in6_addr,
+                    pub ipv6mr_interface: c_uint,
                 }
                 pub struct addrinfo {
-                    ai_flags: c_int,
-                    ai_family: c_int,
-                    ai_socktype: c_int,
-                    ai_protocol: c_int,
-                    ai_addrlen: socklen_t,
-                    ai_addr: *sockaddr,
-                    ai_canonname: *c_char,
-                    ai_next: *addrinfo
+                    pub ai_flags: c_int,
+                    pub ai_family: c_int,
+                    pub ai_socktype: c_int,
+                    pub ai_protocol: c_int,
+                    pub ai_addrlen: socklen_t,
+                    pub ai_addr: *sockaddr,
+                    pub ai_canonname: *c_char,
+                    pub ai_next: *addrinfo,
                 }
                 pub struct sockaddr_un {
-                    sun_family: sa_family_t,
-                    sun_path: [c_char, ..108]
+                    pub sun_family: sa_family_t,
+                    pub sun_path: [c_char, ..108]
                 }
             }
         }
@@ -395,35 +395,35 @@ pub mod posix01 {
                 pub type blkcnt_t = i32;
 
                 pub struct stat {
-                    st_dev: dev_t,
-                    __pad1: c_short,
-                    st_ino: ino_t,
-                    st_mode: mode_t,
-                    st_nlink: nlink_t,
-                    st_uid: uid_t,
-                    st_gid: gid_t,
-                    st_rdev: dev_t,
-                    __pad2: c_short,
-                    st_size: off_t,
-                    st_blksize: blksize_t,
-                    st_blocks: blkcnt_t,
-                    st_atime: time_t,
-                    st_atime_nsec: c_long,
-                    st_mtime: time_t,
-                    st_mtime_nsec: c_long,
-                    st_ctime: time_t,
-                    st_ctime_nsec: c_long,
-                    __unused4: c_long,
-                    __unused5: c_long,
+                    pub st_dev: dev_t,
+                    pub __pad1: c_short,
+                    pub st_ino: ino_t,
+                    pub st_mode: mode_t,
+                    pub st_nlink: nlink_t,
+                    pub st_uid: uid_t,
+                    pub st_gid: gid_t,
+                    pub st_rdev: dev_t,
+                    pub __pad2: c_short,
+                    pub st_size: off_t,
+                    pub st_blksize: blksize_t,
+                    pub st_blocks: blkcnt_t,
+                    pub st_atime: time_t,
+                    pub st_atime_nsec: c_long,
+                    pub st_mtime: time_t,
+                    pub st_mtime_nsec: c_long,
+                    pub st_ctime: time_t,
+                    pub st_ctime_nsec: c_long,
+                    pub __unused4: c_long,
+                    pub __unused5: c_long,
                 }
 
                 pub struct utimbuf {
-                    actime: time_t,
-                    modtime: time_t,
+                    pub actime: time_t,
+                    pub modtime: time_t,
                 }
 
                 pub struct pthread_attr_t {
-                    __size: [u32, ..9]
+                    pub __size: [u32, ..9]
                 }
             }
             #[cfg(target_arch = "arm")]
@@ -437,34 +437,34 @@ pub mod posix01 {
                 pub type blkcnt_t = u32;
 
                 pub struct stat {
-                    st_dev: c_ulonglong,
-                    __pad0: [c_uchar, ..4],
-                    __st_ino: ino_t,
-                    st_mode: c_uint,
-                    st_nlink: c_uint,
-                    st_uid: uid_t,
-                    st_gid: gid_t,
-                    st_rdev: c_ulonglong,
-                    __pad3: [c_uchar, ..4],
-                    st_size: c_longlong,
-                    st_blksize: blksize_t,
-                    st_blocks: c_ulonglong,
-                    st_atime: time_t,
-                    st_atime_nsec: c_ulong,
-                    st_mtime: time_t,
-                    st_mtime_nsec: c_ulong,
-                    st_ctime: time_t,
-                    st_ctime_nsec: c_ulong,
-                    st_ino: c_ulonglong
+                    pub st_dev: c_ulonglong,
+                    pub __pad0: [c_uchar, ..4],
+                    pub __st_ino: ino_t,
+                    pub st_mode: c_uint,
+                    pub st_nlink: c_uint,
+                    pub st_uid: uid_t,
+                    pub st_gid: gid_t,
+                    pub st_rdev: c_ulonglong,
+                    pub __pad3: [c_uchar, ..4],
+                    pub st_size: c_longlong,
+                    pub st_blksize: blksize_t,
+                    pub st_blocks: c_ulonglong,
+                    pub st_atime: time_t,
+                    pub st_atime_nsec: c_ulong,
+                    pub st_mtime: time_t,
+                    pub st_mtime_nsec: c_ulong,
+                    pub st_ctime: time_t,
+                    pub st_ctime_nsec: c_ulong,
+                    pub st_ino: c_ulonglong,
                 }
 
                 pub struct utimbuf {
-                    actime: time_t,
-                    modtime: time_t,
+                    pub actime: time_t,
+                    pub modtime: time_t,
                 }
 
                 pub struct pthread_attr_t {
-                    __size: [u32, ..9]
+                    pub __size: [u32, ..9]
                 }
             }
             #[cfg(target_arch = "mips")]
@@ -479,35 +479,35 @@ pub mod posix01 {
                 pub type blkcnt_t = i32;
 
                 pub struct stat {
-                    st_dev: c_ulong,
-                    st_pad1: [c_long, ..3],
-                    st_ino: ino_t,
-                    st_mode: mode_t,
-                    st_nlink: nlink_t,
-                    st_uid: uid_t,
-                    st_gid: gid_t,
-                    st_rdev: c_ulong,
-                    st_pad2: [c_long, ..2],
-                    st_size: off_t,
-                    st_pad3: c_long,
-                    st_atime: time_t,
-                    st_atime_nsec: c_long,
-                    st_mtime: time_t,
-                    st_mtime_nsec: c_long,
-                    st_ctime: time_t,
-                    st_ctime_nsec: c_long,
-                    st_blksize: blksize_t,
-                    st_blocks: blkcnt_t,
-                    st_pad5: [c_long, ..14],
+                    pub st_dev: c_ulong,
+                    pub st_pad1: [c_long, ..3],
+                    pub st_ino: ino_t,
+                    pub st_mode: mode_t,
+                    pub st_nlink: nlink_t,
+                    pub st_uid: uid_t,
+                    pub st_gid: gid_t,
+                    pub st_rdev: c_ulong,
+                    pub st_pad2: [c_long, ..2],
+                    pub st_size: off_t,
+                    pub st_pad3: c_long,
+                    pub st_atime: time_t,
+                    pub st_atime_nsec: c_long,
+                    pub st_mtime: time_t,
+                    pub st_mtime_nsec: c_long,
+                    pub st_ctime: time_t,
+                    pub st_ctime_nsec: c_long,
+                    pub st_blksize: blksize_t,
+                    pub st_blocks: blkcnt_t,
+                    pub st_pad5: [c_long, ..14],
                 }
 
                 pub struct utimbuf {
-                    actime: time_t,
-                    modtime: time_t,
+                    pub actime: time_t,
+                    pub modtime: time_t,
                 }
 
                 pub struct pthread_attr_t {
-                    __size: [u32, ..9]
+                    pub __size: [u32, ..9]
                 }
             }
             pub mod posix08 {}
@@ -563,33 +563,33 @@ pub mod posix01 {
                 pub type blksize_t = i64;
                 pub type blkcnt_t = i64;
                 pub struct stat {
-                    st_dev: dev_t,
-                    st_ino: ino_t,
-                    st_nlink: nlink_t,
-                    st_mode: mode_t,
-                    st_uid: uid_t,
-                    st_gid: gid_t,
-                    __pad0: c_int,
-                    st_rdev: dev_t,
-                    st_size: off_t,
-                    st_blksize: blksize_t,
-                    st_blocks: blkcnt_t,
-                    st_atime: time_t,
-                    st_atime_nsec: c_long,
-                    st_mtime: time_t,
-                    st_mtime_nsec: c_long,
-                    st_ctime: time_t,
-                    st_ctime_nsec: c_long,
-                    __unused: [c_long, ..3],
+                    pub st_dev: dev_t,
+                    pub st_ino: ino_t,
+                    pub st_nlink: nlink_t,
+                    pub st_mode: mode_t,
+                    pub st_uid: uid_t,
+                    pub st_gid: gid_t,
+                    pub __pad0: c_int,
+                    pub st_rdev: dev_t,
+                    pub st_size: off_t,
+                    pub st_blksize: blksize_t,
+                    pub st_blocks: blkcnt_t,
+                    pub st_atime: time_t,
+                    pub st_atime_nsec: c_long,
+                    pub st_mtime: time_t,
+                    pub st_mtime_nsec: c_long,
+                    pub st_ctime: time_t,
+                    pub st_ctime_nsec: c_long,
+                    pub __unused: [c_long, ..3],
                 }
 
                 pub struct utimbuf {
-                    actime: time_t,
-                    modtime: time_t,
+                    pub actime: time_t,
+                    pub modtime: time_t,
                 }
 
                 pub struct pthread_attr_t {
-                    __size: [u64, ..7]
+                    pub __size: [u64, ..7]
                 }
             }
             pub mod posix08 {
@@ -613,29 +613,29 @@ pub mod posix01 {
                 pub type pthread_t = uintptr_t;
 
                 pub struct glob_t {
-                    gl_pathc:  size_t,
-                    __unused1: size_t,
-                    gl_offs:   size_t,
-                    __unused2: c_int,
-                    gl_pathv:  **c_char,
-
-                    __unused3: *c_void,
-
-                    __unused4: *c_void,
-                    __unused5: *c_void,
-                    __unused6: *c_void,
-                    __unused7: *c_void,
-                    __unused8: *c_void,
+                    pub gl_pathc:  size_t,
+                    pub __unused1: size_t,
+                    pub gl_offs:   size_t,
+                    pub __unused2: c_int,
+                    pub gl_pathv:  **c_char,
+
+                    pub __unused3: *c_void,
+
+                    pub __unused4: *c_void,
+                    pub __unused5: *c_void,
+                    pub __unused6: *c_void,
+                    pub __unused7: *c_void,
+                    pub __unused8: *c_void,
                 }
 
                 pub struct timeval {
-                    tv_sec: time_t,
-                    tv_usec: suseconds_t,
+                    pub tv_sec: time_t,
+                    pub tv_usec: suseconds_t,
                 }
 
                 pub struct timespec {
-                    tv_sec: time_t,
-                    tv_nsec: c_long,
+                    pub tv_sec: time_t,
+                    pub tv_nsec: c_long,
                 }
 
                 pub enum timezone {}
@@ -650,60 +650,60 @@ pub mod bsd44 {
                 pub type in_port_t = u16;
                 pub type in_addr_t = u32;
                 pub struct sockaddr {
-                    sa_len: u8,
-                    sa_family: sa_family_t,
-                    sa_data: [u8, ..14],
+                    pub sa_len: u8,
+                    pub sa_family: sa_family_t,
+                    pub sa_data: [u8, ..14],
                 }
                 pub struct sockaddr_storage {
-                    ss_len: u8,
-                    ss_family: sa_family_t,
-                    __ss_pad1: [u8, ..6],
-                    __ss_align: i64,
-                    __ss_pad2: [u8, ..112],
+                    pub ss_len: u8,
+                    pub ss_family: sa_family_t,
+                    pub __ss_pad1: [u8, ..6],
+                    pub __ss_align: i64,
+                    pub __ss_pad2: [u8, ..112],
                 }
                 pub struct sockaddr_in {
-                    sin_len: u8,
-                    sin_family: sa_family_t,
-                    sin_port: in_port_t,
-                    sin_addr: in_addr,
-                    sin_zero: [u8, ..8],
+                    pub sin_len: u8,
+                    pub sin_family: sa_family_t,
+                    pub sin_port: in_port_t,
+                    pub sin_addr: in_addr,
+                    pub sin_zero: [u8, ..8],
                 }
                 pub struct in_addr {
-                    s_addr: in_addr_t,
+                    pub s_addr: in_addr_t,
                 }
                 pub struct sockaddr_in6 {
-                    sin6_len: u8,
-                    sin6_family: sa_family_t,
-                    sin6_port: in_port_t,
-                    sin6_flowinfo: u32,
-                    sin6_addr: in6_addr,
-                    sin6_scope_id: u32,
+                    pub sin6_len: u8,
+                    pub sin6_family: sa_family_t,
+                    pub sin6_port: in_port_t,
+                    pub sin6_flowinfo: u32,
+                    pub sin6_addr: in6_addr,
+                    pub sin6_scope_id: u32,
                 }
                 pub struct in6_addr {
-                    s6_addr: [u16, ..8]
+                    pub s6_addr: [u16, ..8]
                 }
                 pub struct ip_mreq {
-                    imr_multiaddr: in_addr,
-                    imr_interface: in_addr,
+                    pub imr_multiaddr: in_addr,
+                    pub imr_interface: in_addr,
                 }
                 pub struct ip6_mreq {
-                    ipv6mr_multiaddr: in6_addr,
-                    ipv6mr_interface: c_uint,
+                    pub ipv6mr_multiaddr: in6_addr,
+                    pub ipv6mr_interface: c_uint,
                 }
                 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: *c_char,
-                    ai_addr: *sockaddr,
-                    ai_next: *addrinfo
+                    pub ai_flags: c_int,
+                    pub ai_family: c_int,
+                    pub ai_socktype: c_int,
+                    pub ai_protocol: c_int,
+                    pub ai_addrlen: socklen_t,
+                    pub ai_canonname: *c_char,
+                    pub ai_addr: *sockaddr,
+                    pub ai_next: *addrinfo,
                 }
                 pub struct sockaddr_un {
-                    sun_len: u8,
-                    sun_family: sa_family_t,
-                    sun_path: [c_char, ..104]
+                    pub sun_len: u8,
+                    pub sun_family: sa_family_t,
+                    pub sun_path: [c_char, ..104]
                 }
             }
         }
@@ -759,33 +759,33 @@ pub mod posix01 {
                 pub type blkcnt_t = i64;
                 pub type fflags_t = u32;
                 pub struct stat {
-                    st_dev: dev_t,
-                    st_ino: ino_t,
-                    st_mode: mode_t,
-                    st_nlink: nlink_t,
-                    st_uid: uid_t,
-                    st_gid: gid_t,
-                    st_rdev: dev_t,
-                    st_atime: time_t,
-                    st_atime_nsec: c_long,
-                    st_mtime: time_t,
-                    st_mtime_nsec: c_long,
-                    st_ctime: time_t,
-                    st_ctime_nsec: c_long,
-                    st_size: off_t,
-                    st_blocks: blkcnt_t,
-                    st_blksize: blksize_t,
-                    st_flags: fflags_t,
-                    st_gen: uint32_t,
-                    st_lspare: int32_t,
-                    st_birthtime: time_t,
-                    st_birthtime_nsec: c_long,
-                    __unused: [uint8_t, ..2],
+                    pub st_dev: dev_t,
+                    pub st_ino: ino_t,
+                    pub st_mode: mode_t,
+                    pub st_nlink: nlink_t,
+                    pub st_uid: uid_t,
+                    pub st_gid: gid_t,
+                    pub st_rdev: dev_t,
+                    pub st_atime: time_t,
+                    pub st_atime_nsec: c_long,
+                    pub st_mtime: time_t,
+                    pub st_mtime_nsec: c_long,
+                    pub st_ctime: time_t,
+                    pub st_ctime_nsec: c_long,
+                    pub st_size: off_t,
+                    pub st_blocks: blkcnt_t,
+                    pub st_blksize: blksize_t,
+                    pub st_flags: fflags_t,
+                    pub st_gen: uint32_t,
+                    pub st_lspare: int32_t,
+                    pub st_birthtime: time_t,
+                    pub st_birthtime_nsec: c_long,
+                    pub __unused: [uint8_t, ..2],
                 }
 
                 pub struct utimbuf {
-                    actime: time_t,
-                    modtime: time_t,
+                    pub actime: time_t,
+                    pub modtime: time_t,
                 }
 
                 pub type pthread_attr_t = *c_void;
@@ -809,36 +809,36 @@ pub mod posix01 {
                 use libc::types::os::arch::posix88::{dev_t, ino_t};
                 use libc::types::os::arch::posix88::mode_t;
 
-                // Note: this is the struct called stat64 in win32. Not stat,
+                // pub Note: this is the struct called stat64 in win32. Not stat,
                 // nor stati64.
                 pub struct stat {
-                    st_dev: dev_t,
-                    st_ino: ino_t,
-                    st_mode: mode_t,
-                    st_nlink: c_short,
-                    st_uid: c_short,
-                    st_gid: c_short,
-                    st_rdev: dev_t,
-                    st_size: int64,
-                    st_atime: time64_t,
-                    st_mtime: time64_t,
-                    st_ctime: time64_t,
+                    pub st_dev: dev_t,
+                    pub st_ino: ino_t,
+                    pub st_mode: mode_t,
+                    pub st_nlink: c_short,
+                    pub st_uid: c_short,
+                    pub st_gid: c_short,
+                    pub st_rdev: dev_t,
+                    pub st_size: int64,
+                    pub st_atime: time64_t,
+                    pub st_mtime: time64_t,
+                    pub st_ctime: time64_t,
                 }
 
                 // note that this is called utimbuf64 in win32
                 pub struct utimbuf {
-                    actime: time64_t,
-                    modtime: time64_t,
+                    pub actime: time64_t,
+                    pub modtime: time64_t,
                 }
 
                 pub struct timeval {
-                    tv_sec: time_t,
-                    tv_usec: suseconds_t,
+                    pub tv_sec: time_t,
+                    pub tv_usec: suseconds_t,
                 }
 
                 pub struct timespec {
-                    tv_sec: time_t,
-                    tv_nsec: c_long,
+                    pub tv_sec: time_t,
+                    pub tv_nsec: c_long,
                 }
 
                 pub enum timezone {}
@@ -853,54 +853,54 @@ pub mod bsd44 {
                 pub type in_port_t = u16;
                 pub type in_addr_t = u32;
                 pub struct sockaddr {
-                    sa_family: sa_family_t,
-                    sa_data: [u8, ..14],
+                    pub sa_family: sa_family_t,
+                    pub sa_data: [u8, ..14],
                 }
                 pub struct sockaddr_storage {
-                    ss_family: sa_family_t,
-                    __ss_align: i64,
-                    __ss_pad2: [u8, ..112],
+                    pub ss_family: sa_family_t,
+                    pub __ss_align: i64,
+                    pub __ss_pad2: [u8, ..112],
                 }
                 pub struct sockaddr_in {
-                    sin_family: sa_family_t,
-                    sin_port: in_port_t,
-                    sin_addr: in_addr,
-                    sin_zero: [u8, ..8],
+                    pub sin_family: sa_family_t,
+                    pub sin_port: in_port_t,
+                    pub sin_addr: in_addr,
+                    pub sin_zero: [u8, ..8],
                 }
                 pub struct in_addr {
-                    s_addr: in_addr_t,
+                    pub s_addr: in_addr_t,
                 }
                 pub struct sockaddr_in6 {
-                    sin6_family: sa_family_t,
-                    sin6_port: in_port_t,
-                    sin6_flowinfo: u32,
-                    sin6_addr: in6_addr,
-                    sin6_scope_id: u32,
+                    pub sin6_family: sa_family_t,
+                    pub sin6_port: in_port_t,
+                    pub sin6_flowinfo: u32,
+                    pub sin6_addr: in6_addr,
+                    pub sin6_scope_id: u32,
                 }
                 pub struct in6_addr {
-                    s6_addr: [u16, ..8]
+                    pub s6_addr: [u16, ..8]
                 }
                 pub struct ip_mreq {
-                    imr_multiaddr: in_addr,
-                    imr_interface: in_addr,
+                    pub imr_multiaddr: in_addr,
+                    pub imr_interface: in_addr,
                 }
                 pub struct ip6_mreq {
-                    ipv6mr_multiaddr: in6_addr,
-                    ipv6mr_interface: c_uint,
+                    pub ipv6mr_multiaddr: in6_addr,
+                    pub ipv6mr_interface: c_uint,
                 }
                 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: *c_char,
-                    ai_addr: *sockaddr,
-                    ai_next: *addrinfo
+                    pub ai_flags: c_int,
+                    pub ai_family: c_int,
+                    pub ai_socktype: c_int,
+                    pub ai_protocol: c_int,
+                    pub ai_addrlen: size_t,
+                    pub ai_canonname: *c_char,
+                    pub ai_addr: *sockaddr,
+                    pub ai_next: *addrinfo,
                 }
                 pub struct sockaddr_un {
-                    sun_family: sa_family_t,
-                    sun_path: [c_char, ..108]
+                    pub sun_family: sa_family_t,
+                    pub sun_path: [c_char, ..108]
                 }
             }
         }
@@ -1038,47 +1038,47 @@ pub mod extra {
                 pub type int64 = i64;
 
                 pub struct STARTUPINFO {
-                    cb: DWORD,
-                    lpReserved: LPWSTR,
-                    lpDesktop: LPWSTR,
-                    lpTitle: LPWSTR,
-                    dwX: DWORD,
-                    dwY: DWORD,
-                    dwXSize: DWORD,
-                    dwYSize: DWORD,
-                    dwXCountChars: DWORD,
-                    dwYCountCharts: DWORD,
-                    dwFillAttribute: DWORD,
-                    dwFlags: DWORD,
-                    wShowWindow: WORD,
-                    cbReserved2: WORD,
-                    lpReserved2: LPBYTE,
-                    hStdInput: HANDLE,
-                    hStdOutput: HANDLE,
-                    hStdError: HANDLE
+                    pub cb: DWORD,
+                    pub lpReserved: LPWSTR,
+                    pub lpDesktop: LPWSTR,
+                    pub lpTitle: LPWSTR,
+                    pub dwX: DWORD,
+                    pub dwY: DWORD,
+                    pub dwXSize: DWORD,
+                    pub dwYSize: DWORD,
+                    pub dwXCountChars: DWORD,
+                    pub dwYCountCharts: DWORD,
+                    pub dwFillAttribute: DWORD,
+                    pub dwFlags: DWORD,
+                    pub wShowWindow: WORD,
+                    pub cbReserved2: WORD,
+                    pub lpReserved2: LPBYTE,
+                    pub hStdInput: HANDLE,
+                    pub hStdOutput: HANDLE,
+                    pub hStdError: HANDLE,
                 }
                 pub type LPSTARTUPINFO = *mut STARTUPINFO;
 
                 pub struct PROCESS_INFORMATION {
-                    hProcess: HANDLE,
-                    hThread: HANDLE,
-                    dwProcessId: DWORD,
-                    dwThreadId: DWORD
+                    pub hProcess: HANDLE,
+                    pub hThread: HANDLE,
+                    pub dwProcessId: DWORD,
+                    pub dwThreadId: DWORD,
                 }
                 pub type LPPROCESS_INFORMATION = *mut PROCESS_INFORMATION;
 
                 pub struct SYSTEM_INFO {
-                    wProcessorArchitecture: WORD,
-                    wReserved: WORD,
-                    dwPageSize: DWORD,
-                    lpMinimumApplicationAddress: LPVOID,
-                    lpMaximumApplicationAddress: LPVOID,
-                    dwActiveProcessorMask: DWORD,
-                    dwNumberOfProcessors: DWORD,
-                    dwProcessorType: DWORD,
-                    dwAllocationGranularity: DWORD,
-                    wProcessorLevel: WORD,
-                    wProcessorRevision: WORD
+                    pub wProcessorArchitecture: WORD,
+                    pub wReserved: WORD,
+                    pub dwPageSize: DWORD,
+                    pub lpMinimumApplicationAddress: LPVOID,
+                    pub lpMaximumApplicationAddress: LPVOID,
+                    pub dwActiveProcessorMask: DWORD,
+                    pub dwNumberOfProcessors: DWORD,
+                    pub dwProcessorType: DWORD,
+                    pub dwAllocationGranularity: DWORD,
+                    pub wProcessorLevel: WORD,
+                    pub wProcessorRevision: WORD,
                 }
                 pub type LPSYSTEM_INFO = *mut SYSTEM_INFO;
 
@@ -1101,68 +1101,68 @@ pub fn new() -> SYSTEM_INFO {
                 }
 
                 pub struct MEMORY_BASIC_INFORMATION {
-                    BaseAddress: LPVOID,
-                    AllocationBase: LPVOID,
-                    AllocationProtect: DWORD,
-                    RegionSize: SIZE_T,
-                    State: DWORD,
-                    Protect: DWORD,
-                    Type: DWORD
+                    pub BaseAddress: LPVOID,
+                    pub AllocationBase: LPVOID,
+                    pub AllocationProtect: DWORD,
+                    pub RegionSize: SIZE_T,
+                    pub State: DWORD,
+                    pub Protect: DWORD,
+                    pub Type: DWORD,
                 }
                 pub type LPMEMORY_BASIC_INFORMATION = *mut MEMORY_BASIC_INFORMATION;
 
                 pub struct OVERLAPPED {
-                    Internal: *c_ulong,
-                    InternalHigh: *c_ulong,
-                    Offset: DWORD,
-                    OffsetHigh: DWORD,
-                    hEvent: HANDLE,
+                    pub Internal: *c_ulong,
+                    pub InternalHigh: *c_ulong,
+                    pub Offset: DWORD,
+                    pub OffsetHigh: DWORD,
+                    pub hEvent: HANDLE,
                 }
 
                 pub type LPOVERLAPPED = *mut OVERLAPPED;
 
                 pub struct FILETIME {
-                    dwLowDateTime: DWORD,
-                    dwHighDateTime: DWORD,
+                    pub dwLowDateTime: DWORD,
+                    pub dwHighDateTime: DWORD,
                 }
 
                 pub type LPFILETIME = *mut FILETIME;
 
                 pub struct GUID {
-                    Data1: DWORD,
-                    Data2: DWORD,
-                    Data3: DWORD,
-                    Data4: [BYTE, ..8],
+                    pub Data1: DWORD,
+                    pub Data2: DWORD,
+                    pub Data3: DWORD,
+                    pub Data4: [BYTE, ..8],
                 }
 
                 pub struct WSAPROTOCOLCHAIN {
-                    ChainLen: c_int,
-                    ChainEntries: [DWORD, ..MAX_PROTOCOL_CHAIN],
+                    pub ChainLen: c_int,
+                    pub ChainEntries: [DWORD, ..MAX_PROTOCOL_CHAIN],
                 }
 
                 pub type LPWSAPROTOCOLCHAIN = *mut WSAPROTOCOLCHAIN;
 
                 pub struct WSAPROTOCOL_INFO {
-                    dwServiceFlags1: DWORD,
-                    dwServiceFlags2: DWORD,
-                    dwServiceFlags3: DWORD,
-                    dwServiceFlags4: DWORD,
-                    dwProviderFlags: DWORD,
-                    ProviderId: GUID,
-                    dwCatalogEntryId: DWORD,
-                    ProtocolChain: WSAPROTOCOLCHAIN,
-                    iVersion: c_int,
-                    iAddressFamily: c_int,
-                    iMaxSockAddr: c_int,
-                    iMinSockAddr: c_int,
-                    iSocketType: c_int,
-                    iProtocol: c_int,
-                    iProtocolMaxOffset: c_int,
-                    iNetworkByteOrder: c_int,
-                    iSecurityScheme: c_int,
-                    dwMessageSize: DWORD,
-                    dwProviderReserved: DWORD,
-                    szProtocol: [u8, ..WSAPROTOCOL_LEN+1],
+                    pub dwServiceFlags1: DWORD,
+                    pub dwServiceFlags2: DWORD,
+                    pub dwServiceFlags3: DWORD,
+                    pub dwServiceFlags4: DWORD,
+                    pub dwProviderFlags: DWORD,
+                    pub ProviderId: GUID,
+                    pub dwCatalogEntryId: DWORD,
+                    pub ProtocolChain: WSAPROTOCOLCHAIN,
+                    pub iVersion: c_int,
+                    pub iAddressFamily: c_int,
+                    pub iMaxSockAddr: c_int,
+                    pub iMinSockAddr: c_int,
+                    pub iSocketType: c_int,
+                    pub iProtocol: c_int,
+                    pub iProtocolMaxOffset: c_int,
+                    pub iNetworkByteOrder: c_int,
+                    pub iSecurityScheme: c_int,
+                    pub dwMessageSize: DWORD,
+                    pub dwProviderReserved: DWORD,
+                    pub szProtocol: [u8, ..WSAPROTOCOL_LEN+1],
                 }
 
                 pub type LPWSAPROTOCOL_INFO = *mut WSAPROTOCOL_INFO;
@@ -1184,29 +1184,29 @@ pub mod posix01 {
                 pub type pthread_t = uintptr_t;
 
                 pub struct glob_t {
-                    gl_pathc:  size_t,
-                    __unused1: c_int,
-                    gl_offs:   size_t,
-                    __unused2: c_int,
-                    gl_pathv:  **c_char,
-
-                    __unused3: *c_void,
-
-                    __unused4: *c_void,
-                    __unused5: *c_void,
-                    __unused6: *c_void,
-                    __unused7: *c_void,
-                    __unused8: *c_void,
+                    pub gl_pathc:  size_t,
+                    pub __unused1: c_int,
+                    pub gl_offs:   size_t,
+                    pub __unused2: c_int,
+                    pub gl_pathv:  **c_char,
+
+                    pub __unused3: *c_void,
+
+                    pub __unused4: *c_void,
+                    pub __unused5: *c_void,
+                    pub __unused6: *c_void,
+                    pub __unused7: *c_void,
+                    pub __unused8: *c_void,
                 }
 
                 pub struct timeval {
-                    tv_sec: time_t,
-                    tv_usec: suseconds_t,
+                    pub tv_sec: time_t,
+                    pub tv_usec: suseconds_t,
                 }
 
                 pub struct timespec {
-                    tv_sec: time_t,
-                    tv_nsec: c_long,
+                    pub tv_sec: time_t,
+                    pub tv_nsec: c_long,
                 }
 
                 pub enum timezone {}
@@ -1222,60 +1222,60 @@ pub mod bsd44 {
                 pub type in_port_t = u16;
                 pub type in_addr_t = u32;
                 pub struct sockaddr {
-                    sa_len: u8,
-                    sa_family: sa_family_t,
-                    sa_data: [u8, ..14],
+                    pub sa_len: u8,
+                    pub sa_family: sa_family_t,
+                    pub sa_data: [u8, ..14],
                 }
                 pub struct sockaddr_storage {
-                    ss_len: u8,
-                    ss_family: sa_family_t,
-                    __ss_pad1: [u8, ..6],
-                    __ss_align: i64,
-                    __ss_pad2: [u8, ..112],
+                    pub ss_len: u8,
+                    pub ss_family: sa_family_t,
+                    pub __ss_pad1: [u8, ..6],
+                    pub __ss_align: i64,
+                    pub __ss_pad2: [u8, ..112],
                 }
                 pub struct sockaddr_in {
-                    sin_len: u8,
-                    sin_family: sa_family_t,
-                    sin_port: in_port_t,
-                    sin_addr: in_addr,
-                    sin_zero: [u8, ..8],
+                    pub sin_len: u8,
+                    pub sin_family: sa_family_t,
+                    pub sin_port: in_port_t,
+                    pub sin_addr: in_addr,
+                    pub sin_zero: [u8, ..8],
                 }
                 pub struct in_addr {
-                    s_addr: in_addr_t,
+                    pub s_addr: in_addr_t,
                 }
                 pub struct sockaddr_in6 {
-                    sin6_len: u8,
-                    sin6_family: sa_family_t,
-                    sin6_port: in_port_t,
-                    sin6_flowinfo: u32,
-                    sin6_addr: in6_addr,
-                    sin6_scope_id: u32,
+                    pub sin6_len: u8,
+                    pub sin6_family: sa_family_t,
+                    pub sin6_port: in_port_t,
+                    pub sin6_flowinfo: u32,
+                    pub sin6_addr: in6_addr,
+                    pub sin6_scope_id: u32,
                 }
                 pub struct in6_addr {
-                    s6_addr: [u16, ..8]
+                    pub s6_addr: [u16, ..8]
                 }
                 pub struct ip_mreq {
-                    imr_multiaddr: in_addr,
-                    imr_interface: in_addr,
+                    pub imr_multiaddr: in_addr,
+                    pub imr_interface: in_addr,
                 }
                 pub struct ip6_mreq {
-                    ipv6mr_multiaddr: in6_addr,
-                    ipv6mr_interface: c_uint,
+                    pub ipv6mr_multiaddr: in6_addr,
+                    pub ipv6mr_interface: c_uint,
                 }
                 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: *c_char,
-                    ai_addr: *sockaddr,
-                    ai_next: *addrinfo
+                    pub ai_flags: c_int,
+                    pub ai_family: c_int,
+                    pub ai_socktype: c_int,
+                    pub ai_protocol: c_int,
+                    pub ai_addrlen: socklen_t,
+                    pub ai_canonname: *c_char,
+                    pub ai_addr: *sockaddr,
+                    pub ai_next: *addrinfo,
                 }
                 pub struct sockaddr_un {
-                    sun_len: u8,
-                    sun_family: sa_family_t,
-                    sun_path: [c_char, ..104]
+                    pub sun_len: u8,
+                    pub sun_family: sa_family_t,
+                    pub sun_path: [c_char, ..104]
                 }
             }
         }
@@ -1330,38 +1330,38 @@ pub mod posix01 {
                 pub type blkcnt_t = i32;
 
                 pub struct stat {
-                    st_dev: dev_t,
-                    st_mode: mode_t,
-                    st_nlink: nlink_t,
-                    st_ino: ino_t,
-                    st_uid: uid_t,
-                    st_gid: gid_t,
-                    st_rdev: dev_t,
-                    st_atime: time_t,
-                    st_atime_nsec: c_long,
-                    st_mtime: time_t,
-                    st_mtime_nsec: c_long,
-                    st_ctime: time_t,
-                    st_ctime_nsec: c_long,
-                    st_birthtime: time_t,
-                    st_birthtime_nsec: c_long,
-                    st_size: off_t,
-                    st_blocks: blkcnt_t,
-                    st_blksize: blksize_t,
-                    st_flags: uint32_t,
-                    st_gen: uint32_t,
-                    st_lspare: int32_t,
-                    st_qspare: [int64_t, ..2],
+                    pub st_dev: dev_t,
+                    pub st_mode: mode_t,
+                    pub st_nlink: nlink_t,
+                    pub st_ino: ino_t,
+                    pub st_uid: uid_t,
+                    pub st_gid: gid_t,
+                    pub st_rdev: dev_t,
+                    pub st_atime: time_t,
+                    pub st_atime_nsec: c_long,
+                    pub st_mtime: time_t,
+                    pub st_mtime_nsec: c_long,
+                    pub st_ctime: time_t,
+                    pub st_ctime_nsec: c_long,
+                    pub st_birthtime: time_t,
+                    pub st_birthtime_nsec: c_long,
+                    pub st_size: off_t,
+                    pub st_blocks: blkcnt_t,
+                    pub st_blksize: blksize_t,
+                    pub st_flags: uint32_t,
+                    pub st_gen: uint32_t,
+                    pub st_lspare: int32_t,
+                    pub st_qspare: [int64_t, ..2],
                 }
 
                 pub struct utimbuf {
-                    actime: time_t,
-                    modtime: time_t,
+                    pub actime: time_t,
+                    pub modtime: time_t,
                 }
 
                 pub struct pthread_attr_t {
-                    __sig: c_long,
-                    __opaque: [c_char, ..36]
+                    pub __sig: c_long,
+                    pub __opaque: [c_char, ..36]
                 }
             }
             pub mod posix08 {
@@ -1370,8 +1370,8 @@ pub mod bsd44 {
             }
             pub mod extra {
                 pub struct mach_timebase_info {
-                    numer: u32,
-                    denom: u32,
+                    pub numer: u32,
+                    pub denom: u32,
                 }
 
                 pub type mach_timebase_info_data_t = mach_timebase_info;
@@ -1428,38 +1428,38 @@ pub mod posix01 {
                 pub type blkcnt_t = i32;
 
                 pub struct stat {
-                    st_dev: dev_t,
-                    st_mode: mode_t,
-                    st_nlink: nlink_t,
-                    st_ino: ino_t,
-                    st_uid: uid_t,
-                    st_gid: gid_t,
-                    st_rdev: dev_t,
-                    st_atime: time_t,
-                    st_atime_nsec: c_long,
-                    st_mtime: time_t,
-                    st_mtime_nsec: c_long,
-                    st_ctime: time_t,
-                    st_ctime_nsec: c_long,
-                    st_birthtime: time_t,
-                    st_birthtime_nsec: c_long,
-                    st_size: off_t,
-                    st_blocks: blkcnt_t,
-                    st_blksize: blksize_t,
-                    st_flags: uint32_t,
-                    st_gen: uint32_t,
-                    st_lspare: int32_t,
-                    st_qspare: [int64_t, ..2],
+                    pub st_dev: dev_t,
+                    pub st_mode: mode_t,
+                    pub st_nlink: nlink_t,
+                    pub st_ino: ino_t,
+                    pub st_uid: uid_t,
+                    pub st_gid: gid_t,
+                    pub st_rdev: dev_t,
+                    pub st_atime: time_t,
+                    pub st_atime_nsec: c_long,
+                    pub st_mtime: time_t,
+                    pub st_mtime_nsec: c_long,
+                    pub st_ctime: time_t,
+                    pub st_ctime_nsec: c_long,
+                    pub st_birthtime: time_t,
+                    pub st_birthtime_nsec: c_long,
+                    pub st_size: off_t,
+                    pub st_blocks: blkcnt_t,
+                    pub st_blksize: blksize_t,
+                    pub st_flags: uint32_t,
+                    pub st_gen: uint32_t,
+                    pub st_lspare: int32_t,
+                    pub st_qspare: [int64_t, ..2],
                 }
 
                 pub struct utimbuf {
-                    actime: time_t,
-                    modtime: time_t,
+                    pub actime: time_t,
+                    pub modtime: time_t,
                 }
 
                 pub struct pthread_attr_t {
-                    __sig: c_long,
-                    __opaque: [c_char, ..56]
+                    pub __sig: c_long,
+                    pub __opaque: [c_char, ..56]
                 }
             }
             pub mod posix08 {
@@ -1468,8 +1468,8 @@ pub mod bsd44 {
             }
             pub mod extra {
                 pub struct mach_timebase_info {
-                    numer: u32,
-                    denom: u32,
+                    pub numer: u32,
+                    pub denom: u32,
                 }
 
                 pub type mach_timebase_info_data_t = mach_timebase_info;
index 19b7a5ca6735e6498200223912311968f7b67075..be1c87ba7886ccb2e96264ae60cce78855ec1046 100644 (file)
@@ -535,7 +535,7 @@ fn default() -> Option<T> { None }
 /// methods on `Option`.
 #[deriving(Clone)]
 pub struct Item<A> {
-    priv opt: Option<A>
+    opt: Option<A>
 }
 
 impl<A> Iterator<A> for Item<A> {
index b84ba6a501c2adec80f0750a7f6de4019021b910..5485aaec08567c9ade59d81d3460a81c9840fcc3 100644 (file)
@@ -370,10 +370,10 @@ fn _unsetenv(n: &str) {
 pub struct Pipe {
     /// A file descriptor representing the reading end of the pipe. Data written
     /// on the `out` file descriptor can be read from this file descriptor.
-    input: c_int,
+    pub input: c_int,
     /// A file descriptor representing the write end of the pipe. Data written
     /// to this file descriptor can be read from the `input` file descriptor.
-    out: c_int,
+    pub out: c_int,
 }
 
 /// Creates a new low-level OS in-memory pipe.
@@ -946,11 +946,11 @@ pub fn page_size() -> uint {
 /// let it leave scope by accident if you want it to stick around.
 pub struct MemoryMap {
     /// Pointer to the memory created or modified by this map.
-    data: *mut u8,
+    pub data: *mut u8,
     /// Number of bytes this map applies to
-    len: uint,
+    pub len: uint,
     /// Type of mapping
-    kind: MemoryMapKind
+    pub kind: MemoryMapKind,
 }
 
 /// Type of memory map
index c8465eb039f6ec84e55d89a6451bec1b4b835023..a0097469e56a23c7257f5da23126b285c8c8df3d 100644 (file)
@@ -488,8 +488,8 @@ pub trait GenericPathUnsafe {
 
 /// Helper struct for printing paths with format!()
 pub struct Display<'a, P> {
-    priv path: &'a P,
-    priv filename: bool
+    path: &'a P,
+    filename: bool
 }
 
 impl<'a, P: GenericPath> fmt::Show for Display<'a, P> {
index cb4c830f380e2e93952c8c2eaa6c9c7e735b70c7..098b3edb69d0d0a76db88ab3127900082ba59d88 100644 (file)
@@ -40,8 +40,8 @@
 /// Represents a POSIX file path
 #[deriving(Clone)]
 pub struct Path {
-    priv repr: ~[u8], // assumed to never be empty or contain NULs
-    priv sepidx: Option<uint> // index of the final separator in repr
+    repr: ~[u8], // assumed to never be empty or contain NULs
+    sepidx: Option<uint> // index of the final separator in repr
 }
 
 /// The standard path separator character
index a641787dfd15c7a94cae9a4ab818d61a06bed829..ca9b351210d949f7a61665bb18204590c67c14a6 100644 (file)
@@ -81,9 +81,9 @@
 // preserved by the data structure; let the Windows API error out on them.
 #[deriving(Clone)]
 pub struct Path {
-    priv repr: ~str, // assumed to never be empty
-    priv prefix: Option<PathPrefix>,
-    priv sepidx: Option<uint> // index of the final separator in the non-prefix portion of repr
+    repr: ~str, // assumed to never be empty
+    prefix: Option<PathPrefix>,
+    sepidx: Option<uint> // index of the final separator in the non-prefix portion of repr
 }
 
 impl Eq for Path {
index d776b05bcd9de59210d545917f036c8a73f1d63d..b285b42ee5ec21da3acc52a9414971d14dee55ed 100644 (file)
 
 /// The representation of a Rust managed box
 pub struct Box<T> {
-    ref_count: uint,
-    drop_glue: fn(ptr: *mut u8),
-    prev: *mut Box<T>,
-    next: *mut Box<T>,
-    data: T
+    pub ref_count: uint,
+    pub drop_glue: fn(ptr: *mut u8),
+    pub prev: *mut Box<T>,
+    pub next: *mut Box<T>,
+    pub data: T,
 }
 
 /// The representation of a Rust vector
 pub struct Vec<T> {
-    fill: uint,
-    alloc: uint,
-    data: T
+    pub fill: uint,
+    pub alloc: uint,
+    pub data: T,
 }
 
 /// The representation of a Rust string
@@ -40,20 +40,20 @@ pub struct Vec<T> {
 
 /// The representation of a Rust slice
 pub struct Slice<T> {
-    data: *T,
-    len: uint
+    pub data: *T,
+    pub len: uint,
 }
 
 /// The representation of a Rust closure
 pub struct Closure {
-    code: *(),
-    env: *(),
+    pub code: *(),
+    pub env: *(),
 }
 
 /// The representation of a Rust procedure (`proc()`)
 pub struct Procedure {
-    code: *(),
-    env: *(),
+    pub code: *(),
+    pub env: *(),
 }
 
 /// The representation of a Rust trait object.
@@ -61,8 +61,8 @@ pub struct Procedure {
 /// This struct does not have a `Repr` implementation
 /// because there is no way to refer to all trait objects generically.
 pub struct TraitObject {
-    vtable: *(),
-    data: *(),
+    pub vtable: *(),
+    pub data: *(),
 }
 
 /// This trait is meant to map equivalences between raw structs and their
index d26038f508f35b081463473a08ae46e981e3485b..ff6e494b948c60dfd045568c075e1e2374d733c1 100644 (file)
@@ -43,9 +43,9 @@ struct RcBox<T> {
 /// Immutable reference counted pointer type
 #[unsafe_no_drop_flag]
 pub struct Rc<T> {
-    priv ptr: *mut RcBox<T>,
-    priv nosend: marker::NoSend,
-    priv noshare: marker::NoShare
+    ptr: *mut RcBox<T>,
+    nosend: marker::NoSend,
+    noshare: marker::NoShare
 }
 
 impl<T> Rc<T> {
@@ -151,9 +151,9 @@ fn cmp(&self, other: &Rc<T>) -> Ordering { (**self).cmp(&**other) }
 /// Weak reference to a reference-counted box
 #[unsafe_no_drop_flag]
 pub struct Weak<T> {
-    priv ptr: *mut RcBox<T>,
-    priv nosend: marker::NoSend,
-    priv noshare: marker::NoShare
+    ptr: *mut RcBox<T>,
+    nosend: marker::NoSend,
+    noshare: marker::NoShare
 }
 
 impl<T> Weak<T> {
index 183318cbfdb42347e21bf06eb9ee2eacbe4ee254..997b65c2e1f9274ebbfe0d0fddc49503a67c81cf 100644 (file)
@@ -40,7 +40,7 @@ pub fn align(size: uint, align: uint) -> uint {
 
 /// Adaptor to wrap around visitors implementing MovePtr.
 pub struct MovePtrAdaptor<V> {
-    priv inner: V
+    inner: V
 }
 pub fn MovePtrAdaptor<V:TyVisitor + MovePtr>(v: V) -> MovePtrAdaptor<V> {
     MovePtrAdaptor { inner: v }
index e15ca3c0320d68ba3a9100b8a957b214a8ddddde..9d1d406e803b7752566b1b00b96d1744715abc91 100644 (file)
@@ -101,11 +101,11 @@ enum VariantState {
 }
 
 pub struct ReprVisitor<'a> {
-    priv ptr: *u8,
-    priv ptr_stk: ~[*u8],
-    priv var_stk: ~[VariantState],
-    priv writer: &'a mut io::Writer,
-    priv last_err: Option<io::IoError>,
+    ptr: *u8,
+    ptr_stk: ~[*u8],
+    var_stk: ~[VariantState],
+    writer: &'a mut io::Writer,
+    last_err: Option<io::IoError>,
 }
 
 pub fn ReprVisitor<'a>(ptr: *u8,
index e9a925fb897fb27e043d6f6d9853e7d1092a3d59..4fd610d7423602141e35cbc305111c1afc7c2380 100644 (file)
@@ -17,8 +17,7 @@
 
 #[cfg(not(target_arch = "arm"))]
 #[repr(C)]
-pub enum _Unwind_Action
-{
+pub enum _Unwind_Action {
     _UA_SEARCH_PHASE = 1,
     _UA_CLEANUP_PHASE = 2,
     _UA_HANDLER_FRAME = 4,
@@ -28,14 +27,13 @@ pub enum _Unwind_Action
 
 #[cfg(target_arch = "arm")]
 #[repr(C)]
-pub enum _Unwind_State
-{
-  _US_VIRTUAL_UNWIND_FRAME = 0,
-  _US_UNWIND_FRAME_STARTING = 1,
-  _US_UNWIND_FRAME_RESUME = 2,
-  _US_ACTION_MASK = 3,
-  _US_FORCE_UNWIND = 8,
-  _US_END_OF_STACK = 16
+pub enum _Unwind_State {
+    _US_VIRTUAL_UNWIND_FRAME = 0,
+    _US_UNWIND_FRAME_STARTING = 1,
+    _US_UNWIND_FRAME_RESUME = 2,
+    _US_ACTION_MASK = 3,
+    _US_FORCE_UNWIND = 8,
+    _US_END_OF_STACK = 16
 }
 
 #[repr(C)]
@@ -69,9 +67,9 @@ pub enum _Unwind_Reason_Code {
 pub static unwinder_private_data_size: int = 2;
 
 pub struct _Unwind_Exception {
-    exception_class: _Unwind_Exception_Class,
-    exception_cleanup: _Unwind_Exception_Cleanup_Fn,
-    private: [_Unwind_Word, ..unwinder_private_data_size],
+    pub exception_class: _Unwind_Exception_Class,
+    pub exception_cleanup: _Unwind_Exception_Cleanup_Fn,
+    pub private: [_Unwind_Word, ..unwinder_private_data_size],
 }
 
 pub enum _Unwind_Context {}
index 1b643e8dab20dd5f36e574b80d38a6a90ccc24b3..163e69f96867563edbfaaac54c580fc334fcadea 100644 (file)
 pub type Box = raw::Box<()>;
 
 pub struct MemoryRegion {
-    priv allocations: Vec<*AllocHeader>,
-    priv live_allocations: uint,
+    allocations: Vec<*AllocHeader>,
+    live_allocations: uint,
 }
 
 pub struct LocalHeap {
-    priv memory_region: MemoryRegion,
+    memory_region: MemoryRegion,
 
-    priv live_allocs: *mut raw::Box<()>,
+    live_allocs: *mut raw::Box<()>,
 }
 
 impl LocalHeap {
index 30068712977b695452b0094f9313d14fe33ac773..e486932ac3c374faad58eba083f56fbeac69b808 100644 (file)
@@ -31,7 +31,7 @@
 /// Encapsulates a borrowed value. When this value goes out of scope, the
 /// pointer is returned.
 pub struct Borrowed<T> {
-    priv val: *(),
+    val: *(),
 }
 
 #[unsafe_destructor]
index 5f0f0afd1855932517cce99dc0f40ca3ff226774..54708d19a1b4fdff06ac2edec71dece59a9e40f7 100644 (file)
@@ -61,11 +61,11 @@ pub trait RemoteCallback {
 /// libuv (it does translation to windows under the hood).
 pub struct FileOpenConfig {
     /// Path to file to be opened
-    path: Path,
+    pub path: Path,
     /// Flags for file access mode (as per open(2))
-    flags: int,
+    pub flags: int,
     /// File creation mode, ignored unless O_CREAT is passed as part of flags
-    priv mode: int
+    pub mode: int
 }
 
 /// Description of what to do when a file handle is closed
@@ -83,7 +83,7 @@ pub enum CloseBehavior {
 }
 
 pub struct LocalIo<'a> {
-    priv factory: &'a mut IoFactory,
+    factory: &'a mut IoFactory,
 }
 
 #[unsafe_destructor]
index 211c09977d4ac062a5738f35252859bb8808c1a7..d9700ea998018868917e99a2cac19b8790275e34 100644 (file)
 /// in the struct. This contains a pointer to another struct that holds
 /// the type-specific state.
 pub struct Task {
-    heap: LocalHeap,
-    gc: GarbageCollector,
-    storage: LocalStorage,
-    unwinder: Unwinder,
-    death: Death,
-    destroyed: bool,
-    name: Option<SendStr>,
-
-    stdout: Option<~Writer:Send>,
-    stderr: Option<~Writer:Send>,
-
-    priv imp: Option<~Runtime:Send>,
+    pub heap: LocalHeap,
+    pub gc: GarbageCollector,
+    pub storage: LocalStorage,
+    pub unwinder: Unwinder,
+    pub death: Death,
+    pub destroyed: bool,
+    pub name: Option<SendStr>,
+
+    pub stdout: Option<~Writer:Send>,
+    pub stderr: Option<~Writer:Send>,
+
+    imp: Option<~Runtime:Send>,
 }
 
 pub struct GarbageCollector;
@@ -77,11 +77,11 @@ pub enum DeathAction {
 
 /// Per-task state related to task death, killing, failure, etc.
 pub struct Death {
-    on_exit: Option<DeathAction>,
+    pub on_exit: Option<DeathAction>,
 }
 
 pub struct BlockedTasks {
-    priv inner: UnsafeArc<AtomicUint>,
+    inner: UnsafeArc<AtomicUint>,
 }
 
 impl Task {
index 1802016e3b38ad76c872c799080db7823ff9de53..c35ffac064cfd8e1378434937189cac219c0e1f2 100644 (file)
@@ -28,9 +28,9 @@
 /// This struct represents a native thread's state. This is used to join on an
 /// existing thread created in the join-able state.
 pub struct Thread<T> {
-    priv native: imp::rust_thread,
-    priv joined: bool,
-    priv packet: ~Option<T>,
+    native: imp::rust_thread,
+    joined: bool,
+    packet: ~Option<T>,
 }
 
 static DEFAULT_STACK_SIZE: uint = 1024 * 1024;
index 930e0858da1be621314fda4add39cbcf632c7a3b..68d63949ae6015013294e34a34ccab20cb3e2eba 100644 (file)
@@ -75,8 +75,8 @@
 use uw = rt::libunwind;
 
 pub struct Unwinder {
-    priv unwinding: bool,
-    priv cause: Option<~Any:Send>
+    unwinding: bool,
+    cause: Option<~Any:Send>
 }
 
 impl Unwinder {
index 19bb9e728ae0a24a77e2d9d13338fd8c741b3004..bb6cb7a3e25d15bcd1202e2d1394860537cd9672 100644 (file)
@@ -233,10 +233,10 @@ pub fn mut_ref_slice<'a, A>(s: &'a mut A) -> &'a mut [A] {
 /// An iterator over the slices of a vector separated by elements that
 /// match a predicate function.
 pub struct Splits<'a, T> {
-    priv v: &'a [T],
-    priv n: uint,
-    priv pred: 'a |t: &T| -> bool,
-    priv finished: bool
+    v: &'a [T],
+    n: uint,
+    pred: 'a |t: &T| -> bool,
+    finished: bool
 }
 
 impl<'a, T> Iterator<&'a [T]> for Splits<'a, T> {
@@ -282,10 +282,10 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 /// An iterator over the slices of a vector separated by elements that
 /// match a predicate function, from back to front.
 pub struct RevSplits<'a, T> {
-    priv v: &'a [T],
-    priv n: uint,
-    priv pred: 'a |t: &T| -> bool,
-    priv finished: bool
+    v: &'a [T],
+    n: uint,
+    pred: 'a |t: &T| -> bool,
+    finished: bool
 }
 
 impl<'a, T> Iterator<&'a [T]> for RevSplits<'a, T> {
@@ -411,9 +411,9 @@ pub fn unzip<T, U, V: Iterator<(T, U)>>(mut iter: V) -> (~[T], ~[U]) {
 /// The last generated swap is always (0, 1), and it returns the
 /// sequence to its initial order.
 pub struct ElementSwaps {
-    priv sdir: ~[SizeDirection],
+    sdir: ~[SizeDirection],
     /// If true, emit the last swap that returns the sequence to initial state
-    priv emit_reset: bool,
+    emit_reset: bool,
 }
 
 impl ElementSwaps {
@@ -486,8 +486,8 @@ fn new_pos(i: uint, s: Direction) -> uint {
 ///
 /// Generates even and odd permutations alternately.
 pub struct Permutations<T> {
-    priv swaps: ElementSwaps,
-    priv v: ~[T],
+    swaps: ElementSwaps,
+    v: ~[T],
 }
 
 impl<T: Clone> Iterator<~[T]> for Permutations<T> {
@@ -508,8 +508,8 @@ fn next(&mut self) -> Option<~[T]> {
 /// a vector.
 #[deriving(Clone)]
 pub struct Windows<'a, T> {
-    priv v: &'a [T],
-    priv size: uint
+    v: &'a [T],
+    size: uint
 }
 
 impl<'a, T> Iterator<&'a [T]> for Windows<'a, T> {
@@ -542,8 +542,8 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 /// the last slice of the iteration will be the remainder.
 #[deriving(Clone)]
 pub struct Chunks<'a, T> {
-    priv v: &'a [T],
-    priv size: uint
+    v: &'a [T],
+    size: uint
 }
 
 impl<'a, T> Iterator<&'a [T]> for Chunks<'a, T> {
@@ -2632,17 +2632,17 @@ fn default() -> ~[A] { ~[] }
 
 /// Immutable slice iterator
 pub struct Items<'a, T> {
-    priv ptr: *T,
-    priv end: *T,
-    priv marker: marker::ContravariantLifetime<'a>
+    ptr: *T,
+    end: *T,
+    marker: marker::ContravariantLifetime<'a>
 }
 
 /// Mutable slice iterator
 pub struct MutItems<'a, T> {
-    priv ptr: *mut T,
-    priv end: *mut T,
-    priv marker: marker::ContravariantLifetime<'a>,
-    priv marker2: marker::NoCopy
+    ptr: *mut T,
+    end: *mut T,
+    marker: marker::ContravariantLifetime<'a>,
+    marker2: marker::NoCopy
 }
 
 macro_rules! iterator {
@@ -2735,9 +2735,9 @@ fn clone(&self) -> Items<'a, T> { *self }
 /// An iterator over the subslices of the vector which are separated
 /// by elements that match `pred`.
 pub struct MutSplits<'a, T> {
-    priv v: &'a mut [T],
-    priv pred: 'a |t: &T| -> bool,
-    priv finished: bool
+    v: &'a mut [T],
+    pred: 'a |t: &T| -> bool,
+    finished: bool
 }
 
 impl<'a, T> Iterator<&'a mut [T]> for MutSplits<'a, T> {
@@ -2800,8 +2800,8 @@ fn next_back(&mut self) -> Option<&'a mut [T]> {
 /// the vector len is not evenly divided by the chunk size, the last slice of the iteration will be
 /// the remainder.
 pub struct MutChunks<'a, T> {
-    priv v: &'a mut [T],
-    priv chunk_size: uint
+    v: &'a mut [T],
+    chunk_size: uint
 }
 
 impl<'a, T> Iterator<&'a mut [T]> for MutChunks<'a, T> {
@@ -2849,8 +2849,8 @@ fn next_back(&mut self) -> Option<&'a mut [T]> {
 
 /// An iterator that moves out of a vector.
 pub struct MoveItems<T> {
-    priv allocation: *mut u8, // the block of memory allocated for the vector
-    priv iter: Items<'static, T>
+    allocation: *mut u8, // the block of memory allocated for the vector
+    iter: Items<'static, T>
 }
 
 impl<T> Iterator<T> for MoveItems<T> {
index 6d23877b02b7d043f6a01e62650f220af84f43f4..408d236ccc6e743a9faa8b10830fa6ce904f7874 100644 (file)
@@ -275,7 +275,7 @@ fn only_ascii(&self) -> bool {
 #[deriving(Clone)]
 pub struct Chars<'a> {
     /// The slice remaining to be iterated
-    priv string: &'a str,
+    string: &'a str,
 }
 
 impl<'a> Iterator<char> for Chars<'a> {
@@ -320,8 +320,8 @@ fn next_back(&mut self) -> Option<char> {
 #[deriving(Clone)]
 pub struct CharOffsets<'a> {
     /// The original string to be iterated
-    priv string: &'a str,
-    priv iter: Chars<'a>,
+    string: &'a str,
+    iter: Chars<'a>,
 }
 
 impl<'a> Iterator<(uint, char)> for CharOffsets<'a> {
@@ -371,12 +371,12 @@ fn next_back(&mut self) -> Option<(uint, char)> {
 #[deriving(Clone)]
 pub struct CharSplits<'a, Sep> {
     /// The slice remaining to be iterated
-    priv string: &'a str,
-    priv sep: Sep,
+    string: &'a str,
+    sep: Sep,
     /// Whether an empty string at the end is allowed
-    priv allow_trailing_empty: bool,
-    priv only_ascii: bool,
-    priv finished: bool,
+    allow_trailing_empty: bool,
+    only_ascii: bool,
+    finished: bool,
 }
 
 /// An iterator over the substrings of a string, separated by `sep`,
@@ -387,10 +387,10 @@ pub struct CharSplits<'a, Sep> {
 /// splitting at most `count` times.
 #[deriving(Clone)]
 pub struct CharSplitsN<'a, Sep> {
-    priv iter: CharSplits<'a, Sep>,
+    iter: CharSplits<'a, Sep>,
     /// The number of splits remaining
-    priv count: uint,
-    priv invert: bool,
+    count: uint,
+    invert: bool,
 }
 
 /// An iterator over the words of a string, separated by a sequence of whitespace
@@ -503,18 +503,18 @@ fn next(&mut self) -> Option<&'a str> {
 /// substring within a larger string
 #[deriving(Clone)]
 pub struct MatchIndices<'a> {
-    priv haystack: &'a str,
-    priv needle: &'a str,
-    priv position: uint,
+    haystack: &'a str,
+    needle: &'a str,
+    position: uint,
 }
 
 /// An iterator over the substrings of a string separated by a given
 /// search string
 #[deriving(Clone)]
 pub struct StrSplits<'a> {
-    priv it: MatchIndices<'a>,
-    priv last_end: uint,
-    priv finished: bool
+    it: MatchIndices<'a>,
+    last_end: uint,
+    finished: bool
 }
 
 impl<'a> Iterator<(uint, uint)> for MatchIndices<'a> {
@@ -597,10 +597,10 @@ enum NormalizationForm {
 /// Use with the `std::iter` module.
 #[deriving(Clone)]
 pub struct Normalizations<'a> {
-    priv kind: NormalizationForm,
-    priv iter: Chars<'a>,
-    priv buffer: ~[(char, u8)],
-    priv sorted: bool
+    kind: NormalizationForm,
+    iter: Chars<'a>,
+    buffer: ~[(char, u8)],
+    sorted: bool
 }
 
 impl<'a> Iterator<char> for Normalizations<'a> {
@@ -856,7 +856,7 @@ macro_rules! next ( ($ret:expr) => {
 /// of `u16`s.
 #[deriving(Clone)]
 pub struct UTF16Items<'a> {
-    priv iter: slice::Items<'a, u16>
+    iter: slice::Items<'a, u16>
 }
 /// The possibilities for values decoded from a `u16` stream.
 #[deriving(Eq, TotalEq, Clone, Show)]
@@ -1061,9 +1061,9 @@ pub fn utf8_char_width(b: u8) -> uint {
 /// for iterating over the UTF-8 bytes of a string.
 pub struct CharRange {
     /// Current `char`
-    ch: char,
+    pub ch: char,
     /// Index of the first byte of the next `char`
-    next: uint
+    pub next: uint,
 }
 
 // Return the initial codepoint accumulator for the first byte.
index 92974005305531dd20df517486fba51f6f92ee5d..0d0bd740e41e010f254bd25342016883b5442b45 100644 (file)
@@ -35,7 +35,7 @@
 /// Enforces no shared-memory safety.
 #[unsafe_no_drop_flag]
 pub struct UnsafeArc<T> {
-    priv data: *mut ArcData<T>,
+    data: *mut ArcData<T>,
 }
 
 struct ArcData<T> {
index 6cc2f85bd95429374ba9fd2e2b891c3863e06abb..234eae1f97b7f8ef5e0ac69220b85fcba7adb190 100644 (file)
 
 /// An atomic boolean type.
 pub struct AtomicBool {
-    priv v: Unsafe<uint>,
-    priv nocopy: marker::NoCopy
+    v: Unsafe<uint>,
+    nocopy: marker::NoCopy
 }
 
 /// A signed atomic integer type, supporting basic atomic arithmetic operations
 pub struct AtomicInt {
-    priv v: Unsafe<int>,
-    priv nocopy: marker::NoCopy
+    v: Unsafe<int>,
+    nocopy: marker::NoCopy
 }
 
 /// An unsigned atomic integer type, supporting basic atomic arithmetic operations
 pub struct AtomicUint {
-    priv v: Unsafe<uint>,
-    priv nocopy: marker::NoCopy
+    v: Unsafe<uint>,
+    nocopy: marker::NoCopy
 }
 
 /// An unsafe atomic pointer. Only supports basic atomic operations
 pub struct AtomicPtr<T> {
-    priv p: Unsafe<uint>,
-    priv nocopy: marker::NoCopy
+    p: Unsafe<uint>,
+    nocopy: marker::NoCopy
 }
 
 /// An atomic, nullable unique pointer
@@ -144,7 +144,7 @@ pub struct AtomicPtr<T> {
 /// owned heap objects across tasks.
 #[unsafe_no_drop_flag]
 pub struct AtomicOption<T> {
-    priv p: Unsafe<uint>,
+    p: Unsafe<uint>,
 }
 
 /// Atomic memory orderings
index 80a5b9ce3bbc5202d1c181a29a387cb7e37baa16..d01c89878ded994f2f6c9199c618bb2335b2d588 100644 (file)
@@ -86,14 +86,14 @@ struct Deque<T> {
 ///
 /// There may only be one worker per deque.
 pub struct Worker<T> {
-    priv deque: UnsafeArc<Deque<T>>,
+    deque: UnsafeArc<Deque<T>>,
 }
 
 /// The stealing half of the work-stealing deque. Stealers have access to the
 /// opposite end of the deque from the worker, and they only have access to the
 /// `steal` method.
 pub struct Stealer<T> {
-    priv deque: UnsafeArc<Deque<T>>,
+    deque: UnsafeArc<Deque<T>>,
 }
 
 /// When stealing some data, this is an enumeration of the possible outcomes.
@@ -116,7 +116,7 @@ pub enum Stolen<T> {
 /// will only use this structure when allocating a new buffer or deallocating a
 /// previous one.
 pub struct BufferPool<T> {
-    priv pool: Exclusive<~[~Buffer<T>]>,
+    pool: Exclusive<~[~Buffer<T>]>,
 }
 
 /// An internal buffer used by the chase-lev deque. This structure is actually
index dfa962cdb80bd67c7e5787006b6f9d99a0fac1c8..12c05c0d61ceaaa8cce127f651056e3b11bb8241 100644 (file)
@@ -54,7 +54,7 @@ struct State<T> {
 }
 
 pub struct Queue<T> {
-    priv state: UnsafeArc<State<T>>,
+    state: UnsafeArc<State<T>>,
 }
 
 impl<T: Send> State<T> {
index 9d69f2b3b0891128f1977f5586d25ea9f544bf03..142a6239df6dabfd50f23b8b1d5f9c9277d3c6bb 100644 (file)
@@ -67,8 +67,8 @@ struct Node<T> {
 /// may be safely shared so long as it is guaranteed that there is only one
 /// popper at a time (many pushers are allowed).
 pub struct Queue<T> {
-    priv head: AtomicPtr<Node<T>>,
-    priv tail: *mut Node<T>,
+    head: AtomicPtr<Node<T>>,
+    tail: *mut Node<T>,
 }
 
 impl<T> Node<T> {
index 9277587e5872648e484e46e75e027f1cca780b13..4e043ecf17180b9322679dc9af2ef57e77cfb3f1 100644 (file)
@@ -55,19 +55,19 @@ struct Node<T> {
 /// time.
 pub struct Queue<T> {
     // consumer fields
-    priv tail: *mut Node<T>, // where to pop from
-    priv tail_prev: AtomicPtr<Node<T>>, // where to pop from
+    tail: *mut Node<T>, // where to pop from
+    tail_prev: AtomicPtr<Node<T>>, // where to pop from
 
     // producer fields
-    priv head: *mut Node<T>,      // where to push to
-    priv first: *mut Node<T>,     // where to get new nodes from
-    priv tail_copy: *mut Node<T>, // between first/tail
+    head: *mut Node<T>,      // where to push to
+    first: *mut Node<T>,     // where to get new nodes from
+    tail_copy: *mut Node<T>, // between first/tail
 
     // Cache maintenance fields. Additions and subtractions are stored
     // separately in order to allow them to use nonatomic addition/subtraction.
-    priv cache_bound: uint,
-    priv cache_additions: AtomicUint,
-    priv cache_subtractions: AtomicUint,
+    cache_bound: uint,
+    cache_additions: AtomicUint,
+    cache_subtractions: AtomicUint,
 }
 
 impl<T: Send> Node<T> {
index c3d02236948089d3a98c617b8812876b50b494ef..a3d919921ae6d2b281e6a3d46975ebe7cf9a6bb4 100644 (file)
 /// Task configuration options
 pub struct TaskOpts {
     /// Enable lifecycle notifications on the given channel
-    notify_chan: Option<Sender<TaskResult>>,
+    pub notify_chan: Option<Sender<TaskResult>>,
     /// A name for the task-to-be, for identification in failure messages
-    name: Option<SendStr>,
+    pub name: Option<SendStr>,
     /// The size of the stack for the spawned task
-    stack_size: Option<uint>,
+    pub stack_size: Option<uint>,
     /// Task-local stdout
-    stdout: Option<~Writer:Send>,
+    pub stdout: Option<~Writer:Send>,
     /// Task-local stderr
-    stderr: Option<~Writer:Send>,
+    pub stderr: Option<~Writer:Send>,
 }
 
 /**
@@ -85,9 +85,9 @@ pub struct TaskOpts {
 // the run function move them in.
 pub struct TaskBuilder {
     /// Options to spawn the new task with
-    opts: TaskOpts,
-    priv gen_body: Option<proc:Send(v: proc:Send()) -> proc:Send()>,
-    priv nocopy: Option<marker::NoCopy>,
+    pub opts: TaskOpts,
+    gen_body: Option<proc:Send(v: proc:Send()) -> proc:Send()>,
+    nocopy: Option<marker::NoCopy>,
 }
 
 /**
index ae8be25205d41aeaebf503771edf6357216b7929..dc4e55deb4b15e29dcab4e9d2aa2a90c79b4bd30 100644 (file)
 #[lang="unsafe"]
 pub struct Unsafe<T> {
     /// Wrapped value
-    value: T,
+    pub value: T,
 
     /// Invariance marker
-    marker1: marker::InvariantType<T>
+    pub marker1: marker::InvariantType<T>
 }
 
 impl<T> Unsafe<T> {
index 57dbc045a65fedaa3f5df4523fe3694a6323a74e..441a60a5186265d05db84f7d4b206e58143a5329 100644 (file)
@@ -22,7 +22,7 @@
 use option::*;
 use result::*;
 
-pub struct DynamicLibrary { priv handle: *u8}
+pub struct DynamicLibrary { handle: *u8}
 
 impl Drop for DynamicLibrary {
     fn drop(&mut self) {
index 34023ceb452b62dd86abeebbcdebc0da0e524367..c2db8ad9586ee4a90a83237cfd7efe7ebf00aa53 100644 (file)
@@ -67,7 +67,7 @@
 /// Prefer the `NativeMutex` type where possible, since that does not
 /// require manual deallocation.
 pub struct StaticNativeMutex {
-    priv inner: imp::Mutex,
+    inner: imp::Mutex,
 }
 
 /// A native mutex with a destructor for clean-up.
@@ -75,7 +75,7 @@ pub struct StaticNativeMutex {
 /// See `StaticNativeMutex` for a version that is suitable for storing in
 /// statics.
 pub struct NativeMutex {
-    priv inner: StaticNativeMutex
+    inner: StaticNativeMutex
 }
 
 /// Automatically unlocks the mutex that it was created from on
@@ -86,7 +86,7 @@ pub struct NativeMutex {
 /// then.
 #[must_use]
 pub struct LockGuard<'a> {
-    priv lock: &'a StaticNativeMutex
+    lock: &'a StaticNativeMutex
 }
 
 pub static NATIVE_MUTEX_INIT: StaticNativeMutex = StaticNativeMutex {
@@ -372,8 +372,8 @@ pub struct pthread_cond_t { value: libc::c_int }
     }
 
     pub struct Mutex {
-        priv lock: Unsafe<pthread_mutex_t>,
-        priv cond: Unsafe<pthread_cond_t>,
+        lock: Unsafe<pthread_mutex_t>,
+        cond: Unsafe<pthread_cond_t>,
     }
 
     pub static MUTEX_INIT: Mutex = Mutex {
@@ -447,8 +447,8 @@ mod imp {
 
     pub struct Mutex {
         // pointers for the lock/cond handles, atomically updated
-        priv lock: atomics::AtomicUint,
-        priv cond: atomics::AtomicUint,
+        lock: atomics::AtomicUint,
+        cond: atomics::AtomicUint,
     }
 
     pub static MUTEX_INIT: Mutex = Mutex {
index 367967b8e675879f10b7bdf03ab95d942a49e528..f1dd7aa150b1de97c23170424c974dc970eacc06 100644 (file)
@@ -30,7 +30,7 @@ struct ExData<T> {
  * need to block or deschedule while accessing shared state, use extra::sync::RWArc.
  */
 pub struct Exclusive<T> {
-    priv x: UnsafeArc<ExData<T>>
+    x: UnsafeArc<ExData<T>>
 }
 
 impl<T:Send> Clone for Exclusive<T> {
index 62fb52fccf96ee2b5e9346d4c3db36cd9895284f..5e42aaecbb93cef63f6d157a33cafaf3c30b7863 100644 (file)
@@ -56,9 +56,9 @@
 /// ```
 #[unsafe_no_drop_flag]
 pub struct Vec<T> {
-    priv len: uint,
-    priv cap: uint,
-    priv ptr: *mut T
+    len: uint,
+    cap: uint,
+    ptr: *mut T
 }
 
 impl<T> Vec<T> {
@@ -1308,8 +1308,8 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 
 /// An iterator that moves out of a vector.
 pub struct MoveItems<T> {
-    priv allocation: *mut c_void, // the block of memory allocated for the vector
-    priv iter: Items<'static, T>
+    allocation: *mut c_void, // the block of memory allocated for the vector
+    iter: Items<'static, T>
 }
 
 impl<T> Iterator<T> for MoveItems<T> {