auto merge of #11808 : huonw/rust/std-visible-types, r=brson

These are either returned from public functions, and really should
appear in the documentation, but don't since they're private, or are
implementation details that are currently public.
This commit is contained in:
bors
2014-01-25 20:41:36 -08:00
7 changed files with 16 additions and 14 deletions

View File

@@ -22,10 +22,10 @@
///number of elements that a given node can contain. ///number of elements that a given node can contain.
#[allow(missing_doc)] #[allow(missing_doc)]
pub struct BTree<K, V> { pub struct BTree<K, V> {
root: Node<K, V>, priv root: Node<K, V>,
len: uint, priv len: uint,
lower_bound: uint, priv lower_bound: uint,
upper_bound: uint priv upper_bound: uint
} }
//We would probably want to remove the dependence on the Clone trait in the future. //We would probably want to remove the dependence on the Clone trait in the future.
@@ -47,9 +47,9 @@ impl<K: TotalOrd, V> BTree<K, V> {
///Helper function for clone: returns new BTree with supplied root node, ///Helper function for clone: returns new BTree with supplied root node,
///length, and lower bound. For use when the length is known already. ///length, and lower bound. For use when the length is known already.
pub fn new_with_node_len(n: Node<K, V>, fn new_with_node_len(n: Node<K, V>,
length: uint, length: uint,
lb: uint) -> BTree<K, V> { lb: uint) -> BTree<K, V> {
BTree { BTree {
root: n, root: n,
len: length, len: length,
@@ -590,4 +590,3 @@ mod test_btree {
} }
} }

View File

@@ -202,7 +202,8 @@ pub struct TestOpts {
logfile: Option<Path> logfile: Option<Path>
} }
type OptRes = Result<TestOpts, ~str>; /// Result of parsing the options.
pub type OptRes = Result<TestOpts, ~str>;
fn optgroups() -> ~[getopts::groups::OptGroup] { fn optgroups() -> ~[getopts::groups::OptGroup] {
~[groups::optflag("", "ignored", "Run ignored tests"), ~[groups::optflag("", "ignored", "Run ignored tests"),
@@ -722,7 +723,8 @@ enum TestEvent {
TeResult(TestDesc, TestResult), TeResult(TestDesc, TestResult),
} }
type MonitorMsg = (TestDesc, TestResult); /// The message sent to the test monitor from the individual runners.
pub type MonitorMsg = (TestDesc, TestResult);
fn run_tests(opts: &TestOpts, fn run_tests(opts: &TestOpts,
tests: ~[TestDescAndFn], tests: ~[TestDescAndFn],

View File

@@ -63,7 +63,7 @@ pub mod timer;
mod timer_helper; mod timer_helper;
type IoResult<T> = Result<T, IoError>; pub type IoResult<T> = Result<T, IoError>;
fn unimpl() -> IoError { fn unimpl() -> IoError {
IoError { IoError {

View File

@@ -243,7 +243,7 @@ use vec::OwnedVector;
use spsc = sync::spsc_queue; use spsc = sync::spsc_queue;
use mpsc = sync::mpsc_queue; use mpsc = sync::mpsc_queue;
pub use self::select::Select; pub use self::select::{Select, Handle};
macro_rules! test ( macro_rules! test (
{ fn $name:ident() $b:block $($a:attr)*} => ( { fn $name:ident() $b:block $($a:attr)*} => (

View File

@@ -89,6 +89,7 @@ pub struct Select {
/// This handle is used to keep the port in the set as well as interact with the /// This handle is used to keep the port in the set as well as interact with the
/// underlying port. /// underlying port.
pub struct Handle<'port, T> { pub struct Handle<'port, T> {
/// A unique ID for this Handle.
id: uint, id: uint,
priv selector: &'port Select, priv selector: &'port Select,
priv port: &'port mut Port<T>, priv port: &'port mut Port<T>,

View File

@@ -1268,7 +1268,7 @@ pub trait Acceptor<T> {
/// The Some contains another Option representing whether the connection attempt was succesful. /// The Some contains another Option representing whether the connection attempt was succesful.
/// A successful connection will be wrapped in Some. /// A successful connection will be wrapped in Some.
/// A failed connection is represented as a None and raises a condition. /// A failed connection is represented as a None and raises a condition.
struct IncomingConnections<'a, A> { pub struct IncomingConnections<'a, A> {
priv inc: &'a mut A, priv inc: &'a mut A,
} }

View File

@@ -620,7 +620,7 @@ enum NormalizationForm {
/// External iterator for a string's normalization's characters. /// External iterator for a string's normalization's characters.
/// Use with the `std::iter` module. /// Use with the `std::iter` module.
#[deriving(Clone)] #[deriving(Clone)]
struct Normalizations<'a> { pub struct Normalizations<'a> {
priv kind: NormalizationForm, priv kind: NormalizationForm,
priv iter: Chars<'a>, priv iter: Chars<'a>,
priv buffer: ~[(char, u8)], priv buffer: ~[(char, u8)],