diff --git a/src/libstd/ascii.rs b/src/libstd/ascii.rs index 57f7d183458..c9112caa1b9 100644 --- a/src/libstd/ascii.rs +++ b/src/libstd/ascii.rs @@ -25,7 +25,7 @@ use option::{Option, Some, None}; /// 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`. diff --git a/src/libstd/c_str.rs b/src/libstd/c_str.rs index 96c7c218127..ca1a05a2647 100644 --- a/src/libstd/c_str.rs +++ b/src/libstd/c_str.rs @@ -86,8 +86,8 @@ use raw::Slice; /// 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 for CChars<'a> { diff --git a/src/libstd/c_vec.rs b/src/libstd/c_vec.rs index a6cc4c64d20..3b6b914cf14 100644 --- a/src/libstd/c_vec.rs +++ b/src/libstd/c_vec.rs @@ -44,9 +44,9 @@ use raw; /// The type representing a foreign chunk of memory pub struct CVec { - priv base: *mut T, - priv len: uint, - priv dtor: Option, + base: *mut T, + len: uint, + dtor: Option, } #[unsafe_destructor] diff --git a/src/libstd/cell.rs b/src/libstd/cell.rs index a826521ab6b..102b87a3733 100644 --- a/src/libstd/cell.rs +++ b/src/libstd/cell.rs @@ -21,8 +21,8 @@ use ty::Unsafe; /// A mutable memory location that admits only `Copy` data. pub struct Cell { - priv value: Unsafe, - priv noshare: marker::NoShare, + value: Unsafe, + noshare: marker::NoShare, } impl Cell { @@ -69,10 +69,10 @@ impl fmt::Show for Cell { /// A mutable memory location with dynamically checked borrow rules pub struct RefCell { - priv value: Unsafe, - priv borrow: BorrowFlag, - priv nocopy: marker::NoCopy, - priv noshare: marker::NoShare, + value: Unsafe, + borrow: BorrowFlag, + nocopy: marker::NoCopy, + noshare: marker::NoShare, } // Values [1, MAX-1] represent the number of `Ref` active @@ -202,7 +202,7 @@ impl Eq for RefCell { /// Wraps a borrowed reference to a value in a `RefCell` box. pub struct Ref<'b, T> { - priv parent: &'b RefCell + parent: &'b RefCell } #[unsafe_destructor] @@ -222,7 +222,7 @@ impl<'b, T> Deref for Ref<'b, T> { /// Wraps a mutable borrowed reference to a value in a `RefCell` box. pub struct RefMut<'b, T> { - priv parent: &'b mut RefCell + parent: &'b mut RefCell } #[unsafe_destructor] diff --git a/src/libstd/comm/mod.rs b/src/libstd/comm/mod.rs index ef8894a258c..e951077ac83 100644 --- a/src/libstd/comm/mod.rs +++ b/src/libstd/comm/mod.rs @@ -289,34 +289,34 @@ static RESCHED_FREQ: int = 256; /// The receiving-half of Rust's channel type. This half can only be owned by /// one task pub struct Receiver { - priv inner: Flavor, - priv receives: Cell, + inner: Flavor, + receives: Cell, // 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 + rx: &'a Receiver } /// 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 { - priv inner: Flavor, - priv sends: Cell, + inner: Flavor, + sends: Cell, // 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 { - priv inner: UnsafeArc>, + inner: UnsafeArc>, // 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 diff --git a/src/libstd/comm/select.rs b/src/libstd/comm/select.rs index 23bbb5a5611..84191ed6b28 100644 --- a/src/libstd/comm/select.rs +++ b/src/libstd/comm/select.rs @@ -62,10 +62,10 @@ use uint; /// 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, - priv marker1: marker::NoSend, + head: *mut Handle<'static, ()>, + tail: *mut Handle<'static, ()>, + next_id: Cell, + 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, + rx: &'rx Receiver, } struct Packets { cur: *mut Handle<'static, ()> } diff --git a/src/libstd/fmt/mod.rs b/src/libstd/fmt/mod.rs index c2a6510d656..5f8a043b830 100644 --- a/src/libstd/fmt/mod.rs +++ b/src/libstd/fmt/mod.rs @@ -508,20 +508,20 @@ pub type Result = io::IoResult<()>; /// 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, + pub width: Option, /// Optionally specified precision for numeric types - precision: Option, + pub precision: Option, /// 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 @@ impl<'a> Arguments<'a> { /// 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 diff --git a/src/libstd/fmt/num.rs b/src/libstd/fmt/num.rs index 4b35a7596c9..b10a9584df9 100644 --- a/src/libstd/fmt/num.rs +++ b/src/libstd/fmt/num.rs @@ -108,7 +108,7 @@ radix!(UpperHex, 16, "0x", x @ 0 .. 9 => '0' as u8 + x, /// A radix with in the range of `2..36`. #[deriving(Clone, Eq)] pub struct Radix { - priv base: u8, + base: u8, } impl Radix { diff --git a/src/libstd/fmt/parse.rs b/src/libstd/fmt/parse.rs index 384e2ff2380..4752f3a75f4 100644 --- a/src/libstd/fmt/parse.rs +++ b/src/libstd/fmt/parse.rs @@ -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, + pub fill: Option, /// 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> for Parser<'a> { diff --git a/src/libstd/fmt/rt.rs b/src/libstd/fmt/rt.rs index 2a2515754b4..01c2c06c3fb 100644 --- a/src/libstd/fmt/rt.rs +++ b/src/libstd/fmt/rt.rs @@ -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>], } diff --git a/src/libstd/gc.rs b/src/libstd/gc.rs index 06a864f9a10..bd383218ba1 100644 --- a/src/libstd/gc.rs +++ b/src/libstd/gc.rs @@ -29,14 +29,14 @@ use managed; task annihilation. For now, cycles need to be broken manually by using `Rc` \ with a non-owning `Weak` pointer. A tracing garbage collector is planned."] pub struct Gc { - priv ptr: @T, - priv marker: marker::NoSend, + ptr: @T, + marker: marker::NoSend, } #[cfg(test)] pub struct Gc { - priv ptr: @T, - priv marker: marker::NoSend, + ptr: @T, + marker: marker::NoSend, } impl Gc { diff --git a/src/libstd/hash/sip.rs b/src/libstd/hash/sip.rs index d448f4eeb37..d780c30d850 100644 --- a/src/libstd/hash/sip.rs +++ b/src/libstd/hash/sip.rs @@ -36,15 +36,15 @@ use super::{Hash, Hasher}; /// `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 @@ impl Default for 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 { diff --git a/src/libstd/intrinsics.rs b/src/libstd/intrinsics.rs index 988140d38d4..6fe6b3c3639 100644 --- a/src/libstd/intrinsics.rs +++ b/src/libstd/intrinsics.rs @@ -53,19 +53,19 @@ pub type GlueFn = extern "Rust" fn(*i8); #[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 @@ extern "rust-intrinsic" { #[deriving(Eq, Hash, Show, TotalEq)] #[cfg(not(test))] pub struct TypeId { - priv t: u64, + t: u64, } #[cfg(not(test))] diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index fed47dfcff3..4da297a25fd 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -43,10 +43,10 @@ use vec::Vec; /// } /// ``` pub struct BufferedReader { - priv inner: R, - priv buf: Vec, - priv pos: uint, - priv cap: uint, + inner: R, + buf: Vec, + pos: uint, + cap: uint, } impl BufferedReader { @@ -135,9 +135,9 @@ impl Reader for BufferedReader { /// writer.flush(); /// ``` pub struct BufferedWriter { - priv inner: Option, - priv buf: Vec, - priv pos: uint + inner: Option, + buf: Vec, + pos: uint } impl BufferedWriter { @@ -220,7 +220,7 @@ impl Drop for BufferedWriter { /// /// This writer will be flushed when it is dropped. pub struct LineBufferedWriter { - priv inner: BufferedWriter, + inner: BufferedWriter, } impl LineBufferedWriter { @@ -303,7 +303,7 @@ impl Reader for InternalBufferedWriter { /// } /// ``` pub struct BufferedStream { - priv inner: BufferedReader> + inner: BufferedReader> } impl BufferedStream { @@ -391,7 +391,7 @@ mod test { /// A dummy reader intended at testing short-reads propagation. pub struct ShortReader { - priv lengths: ~[uint], + lengths: ~[uint], } impl Reader for ShortReader { diff --git a/src/libstd/io/comm_adapters.rs b/src/libstd/io/comm_adapters.rs index 075c65e04be..06e02072135 100644 --- a/src/libstd/io/comm_adapters.rs +++ b/src/libstd/io/comm_adapters.rs @@ -36,10 +36,10 @@ use slice::{bytes, CloneableVector, MutableVector, ImmutableVector}; /// } /// ``` 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 @@ impl Reader for ChanReader { /// writer.write("hello, world".as_bytes()); /// ``` pub struct ChanWriter { - priv tx: Sender<~[u8]>, + tx: Sender<~[u8]>, } impl ChanWriter { diff --git a/src/libstd/io/extensions.rs b/src/libstd/io/extensions.rs index 0275d9ba8d9..a9fe3be585c 100644 --- a/src/libstd/io/extensions.rs +++ b/src/libstd/io/extensions.rs @@ -38,7 +38,7 @@ use ptr::RawPtr; /// 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> { diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs index 020f493e24b..b6efdfad9d3 100644 --- a/src/libstd/io/fs.rs +++ b/src/libstd/io/fs.rs @@ -78,9 +78,9 @@ use vec::Vec; /// 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 { /// An iterator which walks over a directory pub struct Directories { - priv stack: ~[Path], + stack: ~[Path], } impl Iterator for Directories { diff --git a/src/libstd/io/mem.rs b/src/libstd/io/mem.rs index 7ae717cfccf..e9c6b5b01da 100644 --- a/src/libstd/io/mem.rs +++ b/src/libstd/io/mem.rs @@ -52,8 +52,8 @@ fn combine(seek: SeekStyle, cur: uint, end: uint, offset: i64) -> IoResult /// 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 @@ impl Seek for MemWriter { /// 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 @@ impl Buffer for MemReader { /// 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 @@ impl<'a> Seek for BufWriter<'a> { /// 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> { diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index c1833e6b116..50f8b0b28c4 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -283,11 +283,11 @@ pub type IoResult = Result; 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 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> for Lines<'r, T> { @@ -1050,7 +1050,7 @@ impl<'r, T: Buffer> Iterator> for Lines<'r, 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 Chars<'r, T> { - priv buffer: &'r mut T + buffer: &'r mut T } impl<'r, T: Buffer> Iterator> for Chars<'r, T> { @@ -1290,7 +1290,7 @@ pub trait Acceptor { /// 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> Iterator> 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 diff --git a/src/libstd/io/net/addrinfo.rs b/src/libstd/io/net/addrinfo.rs index bf573bfaed8..4006665e886 100644 --- a/src/libstd/io/net/addrinfo.rs +++ b/src/libstd/io/net/addrinfo.rs @@ -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, - protocol: Option, - flags: uint, + pub family: uint, + pub socktype: Option, + pub protocol: Option, + pub flags: uint, } pub struct Info { - address: SocketAddr, - family: uint, - socktype: Option, - protocol: Option, - flags: uint, + pub address: SocketAddr, + pub family: uint, + pub socktype: Option, + pub protocol: Option, + pub flags: uint, } /// Easy name resolution. Given a hostname, returns the list of IP addresses for diff --git a/src/libstd/io/net/ip.rs b/src/libstd/io/net/ip.rs index 8cb205ab67e..10e1ffacd95 100644 --- a/src/libstd/io/net/ip.rs +++ b/src/libstd/io/net/ip.rs @@ -58,8 +58,8 @@ impl fmt::Show for IpAddr { #[deriving(Eq, TotalEq, Clone, Hash)] pub struct SocketAddr { - ip: IpAddr, - port: Port, + pub ip: IpAddr, + pub port: Port, } impl fmt::Show for SocketAddr { diff --git a/src/libstd/io/net/tcp.rs b/src/libstd/io/net/tcp.rs index 61943eb3d6f..b4dcd204479 100644 --- a/src/libstd/io/net/tcp.rs +++ b/src/libstd/io/net/tcp.rs @@ -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 @@ use rt::rtio::{RtioTcpAcceptor, RtioTcpStream}; /// drop(stream); // close the connection /// ``` pub struct TcpStream { - priv obj: ~RtioTcpStream:Send + obj: ~RtioTcpStream:Send } impl TcpStream { @@ -128,7 +126,7 @@ impl Writer for TcpStream { /// # } /// ``` pub struct TcpListener { - priv obj: ~RtioTcpListener:Send + obj: ~RtioTcpListener:Send } impl TcpListener { @@ -161,7 +159,7 @@ impl Listener for TcpListener { /// 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 for TcpAcceptor { diff --git a/src/libstd/io/net/udp.rs b/src/libstd/io/net/udp.rs index 8169fc1a917..8dd59e859b8 100644 --- a/src/libstd/io/net/udp.rs +++ b/src/libstd/io/net/udp.rs @@ -54,7 +54,7 @@ use rt::rtio::{RtioSocket, RtioUdpSocket, IoFactory, LocalIo}; /// drop(socket); // close the socket /// ``` pub struct UdpSocket { - priv obj: ~RtioUdpSocket:Send + obj: ~RtioUdpSocket:Send } impl UdpSocket { @@ -115,8 +115,8 @@ impl Clone for 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 { diff --git a/src/libstd/io/net/unix.rs b/src/libstd/io/net/unix.rs index 73bb6b56298..0d64a7b141e 100644 --- a/src/libstd/io/net/unix.rs +++ b/src/libstd/io/net/unix.rs @@ -36,7 +36,7 @@ use rt::rtio::{RtioUnixAcceptor, RtioPipe}; /// A stream which communicates over a named pipe. pub struct UnixStream { - priv obj: PipeStream, + obj: PipeStream, } impl UnixStream { @@ -83,7 +83,7 @@ impl Writer for UnixStream { /// 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 @@ impl Listener for UnixListener { /// 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 for UnixAcceptor { diff --git a/src/libstd/io/pipe.rs b/src/libstd/io/pipe.rs index 43b53ca95dc..75ec3d8614e 100644 --- a/src/libstd/io/pipe.rs +++ b/src/libstd/io/pipe.rs @@ -23,7 +23,7 @@ use rt::rtio::{RtioPipe, LocalIo}; /// A synchronous, in-memory pipe. pub struct PipeStream { /// The internal, opaque runtime pipe object. - priv obj: ~RtioPipe:Send, + obj: ~RtioPipe:Send, } impl PipeStream { diff --git a/src/libstd/io/process.rs b/src/libstd/io/process.rs index 0ce35018a9c..1f067021825 100644 --- a/src/libstd/io/process.rs +++ b/src/libstd/io/process.rs @@ -10,8 +10,6 @@ //! Bindings for executing child processes -#![deny(missing_doc)] - use prelude::*; use fmt; @@ -53,23 +51,23 @@ use rt::rtio::{RtioProcess, IoFactory, LocalIo}; /// 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, + pub stdin: Option, /// 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, + pub stdout: Option, /// 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, + pub stderr: Option, /// Extra I/O handles as configured by the original `ProcessConfig` when /// this process was created. This is by default empty. - extra_io: ~[Option], + pub extra_io: ~[Option], } /// 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, + pub uid: Option, /// Similar to `uid`, but sets the group id of the child process. This has /// the same semantics as the `uid` field. - gid: Option, + pub gid: Option, /// 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. diff --git a/src/libstd/io/signal.rs b/src/libstd/io/signal.rs index d6700fda23d..494cc6f6b02 100644 --- a/src/libstd/io/signal.rs +++ b/src/libstd/io/signal.rs @@ -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, + tx: Sender, /// 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, + pub rx: Receiver, } impl Listener { diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index e52df042561..ae98333ca96 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -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 @@ impl Reader for StdReader { /// Representation of a writer to a standard output stream pub struct StdWriter { - priv inner: StdSource + inner: StdSource } impl StdWriter { diff --git a/src/libstd/io/tempfile.rs b/src/libstd/io/tempfile.rs index 34d6b19199a..4ff1c7faaec 100644 --- a/src/libstd/io/tempfile.rs +++ b/src/libstd/io/tempfile.rs @@ -24,7 +24,7 @@ use sync::atomics; /// A wrapper for a path to temporary directory implementing automatic /// scope-based deletion. pub struct TempDir { - priv path: Option + path: Option } impl TempDir { diff --git a/src/libstd/io/timer.rs b/src/libstd/io/timer.rs index 6840c418a9b..839fcab8f86 100644 --- a/src/libstd/io/timer.rs +++ b/src/libstd/io/timer.rs @@ -63,7 +63,7 @@ use rt::rtio::{IoFactory, LocalIo, RtioTimer}; /// # } /// ``` pub struct Timer { - priv obj: ~RtioTimer:Send, + obj: ~RtioTimer:Send, } /// Sleep the current task for `msecs` milliseconds. diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs index 2df0dec2d13..a294ba17289 100644 --- a/src/libstd/io/util.rs +++ b/src/libstd/io/util.rs @@ -17,8 +17,8 @@ use slice::bytes::MutableByteVector; /// Wraps a `Reader`, limiting the number of bytes that can be read from it. pub struct LimitReader { - priv limit: uint, - priv inner: R + limit: uint, + inner: R } impl LimitReader { @@ -85,7 +85,7 @@ impl Reader for NullReader { /// A `Writer` which multiplexes writes to a set of `Writers`. pub struct MultiWriter { - priv writers: ~[~Writer] + writers: ~[~Writer] } impl MultiWriter { @@ -118,8 +118,8 @@ impl Writer for MultiWriter { /// A `Reader` which chains input from multiple `Readers`, reading each to /// completion before moving onto the next. pub struct ChainedReader { - priv readers: I, - priv cur_reader: Option, + readers: I, + cur_reader: Option, } impl> ChainedReader { @@ -156,8 +156,8 @@ impl> Reader for ChainedReader { /// 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 { - priv reader: R, - priv writer: W + reader: R, + writer: W, } impl TeeReader { diff --git a/src/libstd/iter.rs b/src/libstd/iter.rs index 3e3766f1c11..d7424fc9f61 100644 --- a/src/libstd/iter.rs +++ b/src/libstd/iter.rs @@ -751,7 +751,7 @@ impl, U: ExactSize> ExactSize<(A, B)> for Zip {} /// An double-ended iterator with the direction inverted #[deriving(Clone)] pub struct Rev { - priv iter: T + iter: T } impl> Iterator for Rev { @@ -778,7 +778,7 @@ impl + RandomAccessIterator> RandomAccessIterato /// 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> Iterator for ByRef<'a, T> { @@ -1036,8 +1036,8 @@ impl> CloneableIterator for T { /// An iterator that repeats endlessly #[deriving(Clone)] pub struct Cycle { - priv orig: T, - priv iter: T, + orig: T, + iter: T, } impl> Iterator for Cycle { @@ -1087,9 +1087,9 @@ impl> RandomAccessIterator for Cycle /// An iterator which strings two iterators together #[deriving(Clone)] pub struct Chain { - priv a: T, - priv b: U, - priv flag: bool + a: T, + b: U, + flag: bool } impl, U: Iterator> Iterator for Chain { @@ -1156,8 +1156,8 @@ for Chain { /// An iterator which iterates two other iterators simultaneously #[deriving(Clone)] pub struct Zip { - priv a: T, - priv b: U + a: T, + b: U } impl, U: Iterator> Iterator<(A, B)> for Zip { @@ -1234,8 +1234,8 @@ RandomAccessIterator<(A, B)> for Zip { /// 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 @@ impl<'a, A, B, T: RandomAccessIterator> RandomAccessIterator for Map<'a, A /// 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> Iterator for Filter<'a, A, T> { @@ -1327,8 +1327,8 @@ impl<'a, A, T: DoubleEndedIterator> DoubleEndedIterator for Filter<'a, 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 + iter: T, + f: 'a |A| -> Option } impl<'a, A, B, T: Iterator> Iterator for FilterMap<'a, A, B, T> { @@ -1371,8 +1371,8 @@ for FilterMap<'a, A, B, T> { /// An iterator which yields the current count and the element during iteration #[deriving(Clone)] pub struct Enumerate { - priv iter: T, - priv count: uint + iter: T, + count: uint } impl> Iterator<(uint, A)> for Enumerate { @@ -1425,8 +1425,8 @@ impl> RandomAccessIterator<(uint, A)> for Enumerat /// An iterator with a `peek()` that returns an optional reference to the next element. pub struct Peekable { - priv iter: T, - priv peeked: Option, + iter: T, + peeked: Option, } impl> Iterator for Peekable { @@ -1475,9 +1475,9 @@ impl<'a, A, T: Iterator> Peekable { /// 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> Iterator for SkipWhile<'a, A, T> { @@ -1513,9 +1513,9 @@ impl<'a, A, T: Iterator> Iterator for SkipWhile<'a, A, T> { /// 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> Iterator for TakeWhile<'a, A, T> { @@ -1548,8 +1548,8 @@ impl<'a, A, T: Iterator> Iterator for TakeWhile<'a, A, T> { /// An iterator which skips over `n` elements of `iter`. #[deriving(Clone)] pub struct Skip { - priv iter: T, - priv n: uint + iter: T, + n: uint } impl> Iterator for Skip { @@ -1612,8 +1612,8 @@ impl> RandomAccessIterator for Skip { /// An iterator which only iterates over the first `n` iterations of `iter`. #[deriving(Clone)] pub struct Take { - priv iter: T, - priv n: uint + iter: T, + n: uint } impl> Iterator for Take { @@ -1661,11 +1661,11 @@ impl> RandomAccessIterator for Take { /// 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, + iter: T, + f: 'a |&mut St, A| -> Option, /// The current internal state to be passed to the closure next. - state: St + pub state: St, } impl<'a, A, B, T: Iterator, St> Iterator for Scan<'a, A, B, T, St> { @@ -1685,10 +1685,10 @@ impl<'a, A, B, T: Iterator, St> Iterator for Scan<'a, A, B, T, St> { /// 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, - priv backiter: Option, + iter: T, + f: 'a |A| -> U, + frontiter: Option, + backiter: Option, } impl<'a, A, T: Iterator, B, U: Iterator> Iterator for FlatMap<'a, A, T, U> { @@ -1744,8 +1744,8 @@ impl<'a, /// yields `None` once. #[deriving(Clone)] pub struct Fuse { - priv iter: T, - priv done: bool + iter: T, + done: bool } impl> Iterator for Fuse { @@ -1816,8 +1816,8 @@ impl Fuse { /// 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 @@ for Inspect<'a, A, T> { /// An iterator which just modifies the contained state throughout iteration. pub struct Unfold<'a, A, St> { - priv f: 'a |&mut St| -> Option, + f: 'a |&mut St| -> Option, /// 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 @@ impl<'a, A, St> Iterator for Unfold<'a, A, St> { #[deriving(Clone)] pub struct Counter { /// 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 @@ impl + Clone> Iterator for Counter { /// An iterator over the range [start, stop) #[deriving(Clone)] pub struct Range { - 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 @@ impl DoubleEndedIterator for Range { /// An iterator over the range [start, stop] #[deriving(Clone)] pub struct RangeInclusive { - priv range: Range, - priv done: bool + range: Range, + done: bool, } /// Return an iterator over the range [start, stop] @@ -2070,10 +2070,10 @@ impl + Int + Ord + Clone + ToPrimitive> DoubleEndedIterator /// An iterator over the range [start, stop) by `step`. It handles overflow by stopping. #[deriving(Clone)] pub struct RangeStep { - 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 @@ impl Iterator for RangeStep { /// An iterator over the range [start, stop] by `step`. It handles overflow by stopping. #[deriving(Clone)] pub struct RangeStepInclusive { - 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 @@ impl Iterator for RangeStepInclusive { /// An iterator that repeats an element endlessly #[deriving(Clone)] pub struct Repeat { - priv element: A + element: A } impl Repeat { diff --git a/src/libstd/kinds.rs b/src/libstd/kinds.rs index 76aa0d42548..f9827d7fa59 100644 --- a/src/libstd/kinds.rs +++ b/src/libstd/kinds.rs @@ -193,7 +193,7 @@ pub mod marker { /// "interior" mutability: /// /// ``` - /// pub struct Cell { priv value: T } + /// pub struct Cell { value: T } /// # fn main() {} /// ``` /// diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index c130b89b6d4..ab75031e914 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -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 diff --git a/src/libstd/libc.rs b/src/libstd/libc.rs index a310b95a213..52e01f4dbfd 100644 --- a/src/libstd/libc.rs +++ b/src/libstd/libc.rs @@ -244,25 +244,25 @@ pub mod types { pub type pthread_t = c_ulong; pub struct glob_t { - gl_pathc: size_t, - gl_pathv: **c_char, - gl_offs: size_t, + pub gl_pathc: size_t, + pub gl_pathv: **c_char, + pub gl_offs: size_t, - __unused1: *c_void, - __unused2: *c_void, - __unused3: *c_void, - __unused4: *c_void, - __unused5: *c_void, + 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 types { 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 types { 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 types { 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 types { 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 types { 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 types { 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, + pub gl_pathc: size_t, + pub __unused1: size_t, + pub gl_offs: size_t, + pub __unused2: c_int, + pub gl_pathv: **c_char, - __unused3: *c_void, + pub __unused3: *c_void, - __unused4: *c_void, - __unused5: *c_void, - __unused6: *c_void, - __unused7: *c_void, - __unused8: *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 types { 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 types { 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 types { 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 types { 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 types { 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 mod types { } 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 types { 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, + pub gl_pathc: size_t, + pub __unused1: c_int, + pub gl_offs: size_t, + pub __unused2: c_int, + pub gl_pathv: **c_char, - __unused3: *c_void, + pub __unused3: *c_void, - __unused4: *c_void, - __unused5: *c_void, - __unused6: *c_void, - __unused7: *c_void, - __unused8: *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 types { 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 types { 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 types { } 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 types { 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 types { } 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; diff --git a/src/libstd/option.rs b/src/libstd/option.rs index 19b7a5ca673..be1c87ba788 100644 --- a/src/libstd/option.rs +++ b/src/libstd/option.rs @@ -535,7 +535,7 @@ impl Default for Option { /// methods on `Option`. #[deriving(Clone)] pub struct Item { - priv opt: Option + opt: Option } impl Iterator for Item { diff --git a/src/libstd/os.rs b/src/libstd/os.rs index b84ba6a501c..5485aaec085 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -370,10 +370,10 @@ pub 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 diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs index c8465eb039f..a0097469e56 100644 --- a/src/libstd/path/mod.rs +++ b/src/libstd/path/mod.rs @@ -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> { diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index cb4c830f380..098b3edb69d 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -40,8 +40,8 @@ pub type RevStrComponents<'a> = Map<'a, &'a [u8], Option<&'a str>, /// Represents a POSIX file path #[deriving(Clone)] pub struct Path { - priv repr: ~[u8], // assumed to never be empty or contain NULs - priv sepidx: Option // index of the final separator in repr + repr: ~[u8], // assumed to never be empty or contain NULs + sepidx: Option // index of the final separator in repr } /// The standard path separator character diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index a641787dfd1..ca9b351210d 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -81,9 +81,9 @@ pub type RevComponents<'a> = Map<'a, Option<&'a str>, &'a [u8], // 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, - priv sepidx: Option // index of the final separator in the non-prefix portion of repr + repr: ~str, // assumed to never be empty + prefix: Option, + sepidx: Option // index of the final separator in the non-prefix portion of repr } impl Eq for Path { diff --git a/src/libstd/raw.rs b/src/libstd/raw.rs index d776b05bcd9..b285b42ee5e 100644 --- a/src/libstd/raw.rs +++ b/src/libstd/raw.rs @@ -21,18 +21,18 @@ use cast; /// The representation of a Rust managed box pub struct Box { - ref_count: uint, - drop_glue: fn(ptr: *mut u8), - prev: *mut Box, - next: *mut Box, - data: T + pub ref_count: uint, + pub drop_glue: fn(ptr: *mut u8), + pub prev: *mut Box, + pub next: *mut Box, + pub data: T, } /// The representation of a Rust vector pub struct Vec { - 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 type String = Vec; /// The representation of a Rust slice pub struct Slice { - 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 diff --git a/src/libstd/rc.rs b/src/libstd/rc.rs index d26038f508f..ff6e494b948 100644 --- a/src/libstd/rc.rs +++ b/src/libstd/rc.rs @@ -43,9 +43,9 @@ struct RcBox { /// Immutable reference counted pointer type #[unsafe_no_drop_flag] pub struct Rc { - priv ptr: *mut RcBox, - priv nosend: marker::NoSend, - priv noshare: marker::NoShare + ptr: *mut RcBox, + nosend: marker::NoSend, + noshare: marker::NoShare } impl Rc { @@ -151,9 +151,9 @@ impl TotalOrd for Rc { /// Weak reference to a reference-counted box #[unsafe_no_drop_flag] pub struct Weak { - priv ptr: *mut RcBox, - priv nosend: marker::NoSend, - priv noshare: marker::NoShare + ptr: *mut RcBox, + nosend: marker::NoSend, + noshare: marker::NoShare } impl Weak { diff --git a/src/libstd/reflect.rs b/src/libstd/reflect.rs index 183318cbfdb..997b65c2e1f 100644 --- a/src/libstd/reflect.rs +++ b/src/libstd/reflect.rs @@ -40,7 +40,7 @@ pub fn align(size: uint, align: uint) -> uint { /// Adaptor to wrap around visitors implementing MovePtr. pub struct MovePtrAdaptor { - priv inner: V + inner: V } pub fn MovePtrAdaptor(v: V) -> MovePtrAdaptor { MovePtrAdaptor { inner: v } diff --git a/src/libstd/repr.rs b/src/libstd/repr.rs index e15ca3c0320..9d1d406e803 100644 --- a/src/libstd/repr.rs +++ b/src/libstd/repr.rs @@ -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, + ptr: *u8, + ptr_stk: ~[*u8], + var_stk: ~[VariantState], + writer: &'a mut io::Writer, + last_err: Option, } pub fn ReprVisitor<'a>(ptr: *u8, diff --git a/src/libstd/rt/libunwind.rs b/src/libstd/rt/libunwind.rs index e9a925fb897..4fd610d7423 100644 --- a/src/libstd/rt/libunwind.rs +++ b/src/libstd/rt/libunwind.rs @@ -17,8 +17,7 @@ use libc; #[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 static unwinder_private_data_size: int = 20; 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 {} diff --git a/src/libstd/rt/local_heap.rs b/src/libstd/rt/local_heap.rs index 1b643e8dab2..163e69f9686 100644 --- a/src/libstd/rt/local_heap.rs +++ b/src/libstd/rt/local_heap.rs @@ -33,14 +33,14 @@ static MAGIC: u32 = 0xbadc0ffe; 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 { diff --git a/src/libstd/rt/local_ptr.rs b/src/libstd/rt/local_ptr.rs index 30068712977..e486932ac3c 100644 --- a/src/libstd/rt/local_ptr.rs +++ b/src/libstd/rt/local_ptr.rs @@ -31,7 +31,7 @@ pub use self::compiled::*; /// Encapsulates a borrowed value. When this value goes out of scope, the /// pointer is returned. pub struct Borrowed { - priv val: *(), + val: *(), } #[unsafe_destructor] diff --git a/src/libstd/rt/rtio.rs b/src/libstd/rt/rtio.rs index 5f0f0afd185..54708d19a1b 100644 --- a/src/libstd/rt/rtio.rs +++ b/src/libstd/rt/rtio.rs @@ -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] diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index 211c09977d4..d9700ea9980 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -43,18 +43,18 @@ use unstable::finally::Finally; /// 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, + pub heap: LocalHeap, + pub gc: GarbageCollector, + pub storage: LocalStorage, + pub unwinder: Unwinder, + pub death: Death, + pub destroyed: bool, + pub name: Option, - stdout: Option<~Writer:Send>, - stderr: Option<~Writer:Send>, + pub stdout: Option<~Writer:Send>, + pub stderr: Option<~Writer:Send>, - priv imp: Option<~Runtime: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, + pub on_exit: Option, } pub struct BlockedTasks { - priv inner: UnsafeArc, + inner: UnsafeArc, } impl Task { diff --git a/src/libstd/rt/thread.rs b/src/libstd/rt/thread.rs index 1802016e3b3..c35ffac064c 100644 --- a/src/libstd/rt/thread.rs +++ b/src/libstd/rt/thread.rs @@ -28,9 +28,9 @@ type StartFn = extern "C" fn(*libc::c_void) -> imp::rust_thread_return; /// 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 { - priv native: imp::rust_thread, - priv joined: bool, - priv packet: ~Option, + native: imp::rust_thread, + joined: bool, + packet: ~Option, } static DEFAULT_STACK_SIZE: uint = 1024 * 1024; diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs index 930e0858da1..68d63949ae6 100644 --- a/src/libstd/rt/unwind.rs +++ b/src/libstd/rt/unwind.rs @@ -75,8 +75,8 @@ use intrinsics; use uw = rt::libunwind; pub struct Unwinder { - priv unwinding: bool, - priv cause: Option<~Any:Send> + unwinding: bool, + cause: Option<~Any:Send> } impl Unwinder { diff --git a/src/libstd/slice.rs b/src/libstd/slice.rs index 19bb9e728ae..bb6cb7a3e25 100644 --- a/src/libstd/slice.rs +++ b/src/libstd/slice.rs @@ -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 @@ impl<'a, T> Iterator<&'a [T]> for Splits<'a, T> { /// 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>(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 @@ impl Iterator<(uint, uint)> for ElementSwaps { /// /// Generates even and odd permutations alternately. pub struct Permutations { - priv swaps: ElementSwaps, - priv v: ~[T], + swaps: ElementSwaps, + v: ~[T], } impl Iterator<~[T]> for Permutations { @@ -508,8 +508,8 @@ impl Iterator<~[T]> for Permutations { /// 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 @@ impl<'a, T> Iterator<&'a [T]> for Windows<'a, T> { /// 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 @@ impl Default for ~[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 @@ pub type RevMutItems<'a, T> = Rev>; /// 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 @@ impl<'a, T> DoubleEndedIterator<&'a mut [T]> for MutSplits<'a, 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 @@ impl<'a, T> DoubleEndedIterator<&'a mut [T]> for MutChunks<'a, T> { /// An iterator that moves out of a vector. pub struct MoveItems { - 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 Iterator for MoveItems { diff --git a/src/libstd/str.rs b/src/libstd/str.rs index 6d23877b02b..408d236ccc6 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -275,7 +275,7 @@ Section: Iterators #[deriving(Clone)] pub struct Chars<'a> { /// The slice remaining to be iterated - priv string: &'a str, + string: &'a str, } impl<'a> Iterator for Chars<'a> { @@ -320,8 +320,8 @@ impl<'a> DoubleEndedIterator for Chars<'a> { #[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 @@ pub type RevBytes<'a> = Rev>; #[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 type RevCharSplits<'a, Sep> = Rev>; /// 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 @@ impl<'a, Sep: CharEq> Iterator<&'a str> for CharSplitsN<'a, Sep> { /// 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 for Normalizations<'a> { @@ -856,7 +856,7 @@ pub fn is_utf16(v: &[u16]) -> bool { /// 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. diff --git a/src/libstd/sync/arc.rs b/src/libstd/sync/arc.rs index 92974005305..0d0bd740e41 100644 --- a/src/libstd/sync/arc.rs +++ b/src/libstd/sync/arc.rs @@ -35,7 +35,7 @@ use ty::Unsafe; /// Enforces no shared-memory safety. #[unsafe_no_drop_flag] pub struct UnsafeArc { - priv data: *mut ArcData, + data: *mut ArcData, } struct ArcData { diff --git a/src/libstd/sync/atomics.rs b/src/libstd/sync/atomics.rs index 6cc2f85bd95..234eae1f97b 100644 --- a/src/libstd/sync/atomics.rs +++ b/src/libstd/sync/atomics.rs @@ -116,26 +116,26 @@ use ty::Unsafe; /// An atomic boolean type. pub struct AtomicBool { - priv v: Unsafe, - priv nocopy: marker::NoCopy + v: Unsafe, + nocopy: marker::NoCopy } /// A signed atomic integer type, supporting basic atomic arithmetic operations pub struct AtomicInt { - priv v: Unsafe, - priv nocopy: marker::NoCopy + v: Unsafe, + nocopy: marker::NoCopy } /// An unsigned atomic integer type, supporting basic atomic arithmetic operations pub struct AtomicUint { - priv v: Unsafe, - priv nocopy: marker::NoCopy + v: Unsafe, + nocopy: marker::NoCopy } /// An unsafe atomic pointer. Only supports basic atomic operations pub struct AtomicPtr { - priv p: Unsafe, - priv nocopy: marker::NoCopy + p: Unsafe, + nocopy: marker::NoCopy } /// An atomic, nullable unique pointer @@ -144,7 +144,7 @@ pub struct AtomicPtr { /// owned heap objects across tasks. #[unsafe_no_drop_flag] pub struct AtomicOption { - priv p: Unsafe, + p: Unsafe, } /// Atomic memory orderings diff --git a/src/libstd/sync/deque.rs b/src/libstd/sync/deque.rs index 80a5b9ce3bb..d01c89878de 100644 --- a/src/libstd/sync/deque.rs +++ b/src/libstd/sync/deque.rs @@ -86,14 +86,14 @@ struct Deque { /// /// There may only be one worker per deque. pub struct Worker { - priv deque: UnsafeArc>, + deque: UnsafeArc>, } /// 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 { - priv deque: UnsafeArc>, + deque: UnsafeArc>, } /// When stealing some data, this is an enumeration of the possible outcomes. @@ -116,7 +116,7 @@ pub enum Stolen { /// will only use this structure when allocating a new buffer or deallocating a /// previous one. pub struct BufferPool { - priv pool: Exclusive<~[~Buffer]>, + pool: Exclusive<~[~Buffer]>, } /// An internal buffer used by the chase-lev deque. This structure is actually diff --git a/src/libstd/sync/mpmc_bounded_queue.rs b/src/libstd/sync/mpmc_bounded_queue.rs index dfa962cdb80..12c05c0d61c 100644 --- a/src/libstd/sync/mpmc_bounded_queue.rs +++ b/src/libstd/sync/mpmc_bounded_queue.rs @@ -54,7 +54,7 @@ struct State { } pub struct Queue { - priv state: UnsafeArc>, + state: UnsafeArc>, } impl State { diff --git a/src/libstd/sync/mpsc_queue.rs b/src/libstd/sync/mpsc_queue.rs index 9d69f2b3b08..142a6239df6 100644 --- a/src/libstd/sync/mpsc_queue.rs +++ b/src/libstd/sync/mpsc_queue.rs @@ -67,8 +67,8 @@ struct Node { /// 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 { - priv head: AtomicPtr>, - priv tail: *mut Node, + head: AtomicPtr>, + tail: *mut Node, } impl Node { diff --git a/src/libstd/sync/spsc_queue.rs b/src/libstd/sync/spsc_queue.rs index 9277587e587..4e043ecf171 100644 --- a/src/libstd/sync/spsc_queue.rs +++ b/src/libstd/sync/spsc_queue.rs @@ -55,19 +55,19 @@ struct Node { /// time. pub struct Queue { // consumer fields - priv tail: *mut Node, // where to pop from - priv tail_prev: AtomicPtr>, // where to pop from + tail: *mut Node, // where to pop from + tail_prev: AtomicPtr>, // where to pop from // producer fields - priv head: *mut Node, // where to push to - priv first: *mut Node, // where to get new nodes from - priv tail_copy: *mut Node, // between first/tail + head: *mut Node, // where to push to + first: *mut Node, // where to get new nodes from + tail_copy: *mut Node, // 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 Node { diff --git a/src/libstd/task.rs b/src/libstd/task.rs index c3d02236948..a3d919921ae 100644 --- a/src/libstd/task.rs +++ b/src/libstd/task.rs @@ -60,15 +60,15 @@ pub type TaskResult = Result<(), ~Any:Send>; /// Task configuration options pub struct TaskOpts { /// Enable lifecycle notifications on the given channel - notify_chan: Option>, + pub notify_chan: Option>, /// A name for the task-to-be, for identification in failure messages - name: Option, + pub name: Option, /// The size of the stack for the spawned task - stack_size: Option, + pub stack_size: Option, /// 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()>, - priv nocopy: Option, + pub opts: TaskOpts, + gen_body: Option proc:Send()>, + nocopy: Option, } /** diff --git a/src/libstd/ty.rs b/src/libstd/ty.rs index ae8be25205d..dc4e55deb4b 100644 --- a/src/libstd/ty.rs +++ b/src/libstd/ty.rs @@ -48,10 +48,10 @@ use kinds::marker; #[lang="unsafe"] pub struct Unsafe { /// Wrapped value - value: T, + pub value: T, /// Invariance marker - marker1: marker::InvariantType + pub marker1: marker::InvariantType } impl Unsafe { diff --git a/src/libstd/unstable/dynamic_lib.rs b/src/libstd/unstable/dynamic_lib.rs index 57dbc045a65..441a60a5186 100644 --- a/src/libstd/unstable/dynamic_lib.rs +++ b/src/libstd/unstable/dynamic_lib.rs @@ -22,7 +22,7 @@ use ops::*; use option::*; use result::*; -pub struct DynamicLibrary { priv handle: *u8} +pub struct DynamicLibrary { handle: *u8} impl Drop for DynamicLibrary { fn drop(&mut self) { diff --git a/src/libstd/unstable/mutex.rs b/src/libstd/unstable/mutex.rs index 34023ceb452..c2db8ad9586 100644 --- a/src/libstd/unstable/mutex.rs +++ b/src/libstd/unstable/mutex.rs @@ -67,7 +67,7 @@ use ops::Drop; /// 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 @@ mod imp { } pub struct Mutex { - priv lock: Unsafe, - priv cond: Unsafe, + lock: Unsafe, + cond: Unsafe, } 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 { diff --git a/src/libstd/unstable/sync.rs b/src/libstd/unstable/sync.rs index 367967b8e67..f1dd7aa150b 100644 --- a/src/libstd/unstable/sync.rs +++ b/src/libstd/unstable/sync.rs @@ -30,7 +30,7 @@ struct ExData { * need to block or deschedule while accessing shared state, use extra::sync::RWArc. */ pub struct Exclusive { - priv x: UnsafeArc> + x: UnsafeArc> } impl Clone for Exclusive { diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index 62fb52fccf9..5e42aaecbb9 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -56,9 +56,9 @@ use slice::{MutableTotalOrdVector, Vector}; /// ``` #[unsafe_no_drop_flag] pub struct Vec { - priv len: uint, - priv cap: uint, - priv ptr: *mut T + len: uint, + cap: uint, + ptr: *mut T } impl Vec { @@ -1308,8 +1308,8 @@ impl fmt::Show for Vec { /// An iterator that moves out of a vector. pub struct MoveItems { - 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 Iterator for MoveItems {