Skip to content

Commit e36032e

Browse files
committed
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.
2 parents e139b49 + 0aef487 commit e36032e

File tree

7 files changed

+16
-14
lines changed

7 files changed

+16
-14
lines changed

src/libextra/btree.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
///number of elements that a given node can contain.
2323
#[allow(missing_doc)]
2424
pub struct BTree<K, V> {
25-
root: Node<K, V>,
26-
len: uint,
27-
lower_bound: uint,
28-
upper_bound: uint
25+
priv root: Node<K, V>,
26+
priv len: uint,
27+
priv lower_bound: uint,
28+
priv upper_bound: uint
2929
}
3030

3131
//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> {
4747

4848
///Helper function for clone: returns new BTree with supplied root node,
4949
///length, and lower bound. For use when the length is known already.
50-
pub fn new_with_node_len(n: Node<K, V>,
51-
length: uint,
52-
lb: uint) -> BTree<K, V> {
50+
fn new_with_node_len(n: Node<K, V>,
51+
length: uint,
52+
lb: uint) -> BTree<K, V> {
5353
BTree {
5454
root: n,
5555
len: length,
@@ -590,4 +590,3 @@ mod test_btree {
590590
}
591591

592592
}
593-

src/libextra/test.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ pub struct TestOpts {
202202
logfile: Option<Path>
203203
}
204204

205-
type OptRes = Result<TestOpts, ~str>;
205+
/// Result of parsing the options.
206+
pub type OptRes = Result<TestOpts, ~str>;
206207

207208
fn optgroups() -> ~[getopts::groups::OptGroup] {
208209
~[groups::optflag("", "ignored", "Run ignored tests"),
@@ -722,7 +723,8 @@ enum TestEvent {
722723
TeResult(TestDesc, TestResult),
723724
}
724725

725-
type MonitorMsg = (TestDesc, TestResult);
726+
/// The message sent to the test monitor from the individual runners.
727+
pub type MonitorMsg = (TestDesc, TestResult);
726728

727729
fn run_tests(opts: &TestOpts,
728730
tests: ~[TestDescAndFn],

src/libnative/io/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub mod timer;
6363

6464
mod timer_helper;
6565

66-
type IoResult<T> = Result<T, IoError>;
66+
pub type IoResult<T> = Result<T, IoError>;
6767

6868
fn unimpl() -> IoError {
6969
IoError {

src/libstd/comm/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ use vec::OwnedVector;
243243
use spsc = sync::spsc_queue;
244244
use mpsc = sync::mpsc_queue;
245245

246-
pub use self::select::Select;
246+
pub use self::select::{Select, Handle};
247247

248248
macro_rules! test (
249249
{ fn $name:ident() $b:block $($a:attr)*} => (

src/libstd/comm/select.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ pub struct Select {
8989
/// This handle is used to keep the port in the set as well as interact with the
9090
/// underlying port.
9191
pub struct Handle<'port, T> {
92+
/// A unique ID for this Handle.
9293
id: uint,
9394
priv selector: &'port Select,
9495
priv port: &'port mut Port<T>,

src/libstd/io/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@ pub trait Acceptor<T> {
12681268
/// The Some contains another Option representing whether the connection attempt was succesful.
12691269
/// A successful connection will be wrapped in Some.
12701270
/// A failed connection is represented as a None and raises a condition.
1271-
struct IncomingConnections<'a, A> {
1271+
pub struct IncomingConnections<'a, A> {
12721272
priv inc: &'a mut A,
12731273
}
12741274

src/libstd/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ enum NormalizationForm {
620620
/// External iterator for a string's normalization's characters.
621621
/// Use with the `std::iter` module.
622622
#[deriving(Clone)]
623-
struct Normalizations<'a> {
623+
pub struct Normalizations<'a> {
624624
priv kind: NormalizationForm,
625625
priv iter: Chars<'a>,
626626
priv buffer: ~[(char, u8)],

0 commit comments

Comments
 (0)