diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-02-26 17:47:41 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-02-28 11:32:24 -0800 |
| commit | 107bf96ff0dcc427c1842ffb232d29afaea53ca5 (patch) | |
| tree | 8b335088a404957c76f31111b5e6e72c3dc9131a /src/libcore | |
| parent | b171d0ef7b68fed961597d38e6a474d748243987 (diff) | |
| download | rust-107bf96ff0dcc427c1842ffb232d29afaea53ca5.tar.gz rust-107bf96ff0dcc427c1842ffb232d29afaea53ca5.zip | |
librustc: Mark all type implementations public. rs=impl-publicity
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/cell.rs | 2 | ||||
| -rw-r--r-- | src/libcore/comm.rs | 6 | ||||
| -rw-r--r-- | src/libcore/condition.rs | 4 | ||||
| -rw-r--r-- | src/libcore/dlist.rs | 6 | ||||
| -rw-r--r-- | src/libcore/dvec.rs | 4 | ||||
| -rw-r--r-- | src/libcore/mutable.rs | 2 | ||||
| -rw-r--r-- | src/libcore/option.rs | 6 | ||||
| -rw-r--r-- | src/libcore/path.rs | 8 | ||||
| -rw-r--r-- | src/libcore/pipes.rs | 4 | ||||
| -rw-r--r-- | src/libcore/private.rs | 4 | ||||
| -rw-r--r-- | src/libcore/private/extfmt.rs | 2 | ||||
| -rw-r--r-- | src/libcore/rand.rs | 2 | ||||
| -rw-r--r-- | src/libcore/reflect.rs | 2 | ||||
| -rw-r--r-- | src/libcore/repr.rs | 2 | ||||
| -rw-r--r-- | src/libcore/result.rs | 6 | ||||
| -rw-r--r-- | src/libcore/task/mod.rs | 2 |
16 files changed, 31 insertions, 31 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 5887df6802f..6c35c62c3a7 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -28,7 +28,7 @@ pub pure fn empty_cell<T>() -> Cell<T> { Cell { value: None } } -impl<T> Cell<T> { +pub impl<T> Cell<T> { /// Yields the value, failing if the cell is empty. fn take() -> T { if self.is_empty() { diff --git a/src/libcore/comm.rs b/src/libcore/comm.rs index 7939644e51c..da69cd984cd 100644 --- a/src/libcore/comm.rs +++ b/src/libcore/comm.rs @@ -190,7 +190,7 @@ pub fn PortSet<T: Owned>() -> PortSet<T>{ } } -impl<T: Owned> PortSet<T> { +pub impl<T: Owned> PortSet<T> { fn add(port: Port<T>) { self.ports.push(port) @@ -323,12 +323,12 @@ pub fn oneshot<T: Owned>() -> (PortOne<T>, ChanOne<T>) { (port, chan) } -impl<T: Owned> PortOne<T> { +pub impl<T: Owned> PortOne<T> { fn recv(self) -> T { recv_one(self) } fn try_recv(self) -> Option<T> { try_recv_one(self) } } -impl<T: Owned> ChanOne<T> { +pub impl<T: Owned> ChanOne<T> { fn send(self, data: T) { send_one(self, data) } fn try_send(self, data: T) -> bool { try_send_one(self, data) } } diff --git a/src/libcore/condition.rs b/src/libcore/condition.rs index a7c8c1f4d66..00048beae5a 100644 --- a/src/libcore/condition.rs +++ b/src/libcore/condition.rs @@ -25,7 +25,7 @@ pub struct Condition<T, U> { key: task::local_data::LocalDataKey<Handler<T, U>> } -impl<T, U> Condition<T, U> { +pub impl<T, U> Condition<T, U> { fn trap(&self, h: &self/fn(T) -> U) -> Trap/&self<T, U> { unsafe { let p : *RustClosure = ::cast::transmute(&h); @@ -69,7 +69,7 @@ struct Trap<T, U> { handler: @Handler<T, U> } -impl<T, U> Trap<T, U> { +pub impl<T, U> Trap<T, U> { fn in<V>(&self, inner: &self/fn() -> V) -> V { unsafe { let _g = Guard { cond: self.cond }; diff --git a/src/libcore/dlist.rs b/src/libcore/dlist.rs index 35807364889..f1f4e558661 100644 --- a/src/libcore/dlist.rs +++ b/src/libcore/dlist.rs @@ -62,7 +62,7 @@ priv impl<T> DListNode<T> { } } -impl<T> DListNode<T> { +pub impl<T> DListNode<T> { /// Get the next node in the list, if there is one. pure fn next_link(@mut self) -> DListLink<T> { self.assert_links(); @@ -208,7 +208,7 @@ priv impl<T> DList<T> { } } -impl<T> DList<T> { +pub impl<T> DList<T> { /// Get the size of the list. O(1). pure fn len(@mut self) -> uint { self.size } /// Returns true if the list is empty. O(1). @@ -457,7 +457,7 @@ impl<T> DList<T> { } } -impl<T:Copy> DList<T> { +pub impl<T:Copy> DList<T> { /// Remove data from the head of the list. O(1). fn pop(@mut self) -> Option<T> { self.pop_n().map(|nobe| nobe.data) diff --git a/src/libcore/dvec.rs b/src/libcore/dvec.rs index 9f2036c5f41..6c7c195b9d3 100644 --- a/src/libcore/dvec.rs +++ b/src/libcore/dvec.rs @@ -117,7 +117,7 @@ priv impl<A> DVec<A> { // In theory, most everything should work with any A, but in practice // almost nothing works without the copy bound due to limitations // around closures. -impl<A> DVec<A> { +pub impl<A> DVec<A> { /// Reserves space for N elements fn reserve(count: uint) { vec::reserve(&mut self.data, count) @@ -215,7 +215,7 @@ impl<A> DVec<A> { } } -impl<A:Copy> DVec<A> { +pub impl<A:Copy> DVec<A> { /** * Append all elements of a vector to the end of the list * diff --git a/src/libcore/mutable.rs b/src/libcore/mutable.rs index 1fb855520ba..f888fbdb40c 100644 --- a/src/libcore/mutable.rs +++ b/src/libcore/mutable.rs @@ -43,7 +43,7 @@ pub fn unwrap<T>(m: Mut<T>) -> T { value } -impl<T> Data<T> { +pub impl<T> Data<T> { fn borrow_mut<R>(op: &fn(t: &mut T) -> R) -> R { match self.mode { Immutable => fail!(fmt!("%? currently immutable", diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 12ed0df0076..53944c4c2c8 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -281,7 +281,7 @@ pub pure fn expect<T>(opt: Option<T>, reason: &str) -> T { } } -impl<T> Option<T> { +pub impl<T> Option<T> { /// Returns true if the option equals `none` #[inline(always)] pure fn is_none(&self) -> bool { is_none(self) } @@ -393,7 +393,7 @@ impl<T> Option<T> { pure fn expect(self, reason: &str) -> T { expect(self, reason) } } -impl<T:Copy> Option<T> { +pub impl<T:Copy> Option<T> { /** Gets the value out of an option @@ -421,7 +421,7 @@ impl<T:Copy> Option<T> { } } -impl<T:Copy + Zero> Option<T> { +pub impl<T:Copy + Zero> Option<T> { #[inline(always)] pure fn get_or_zero(self) -> T { get_or_zero(self) } } diff --git a/src/libcore/path.rs b/src/libcore/path.rs index 1753862649f..4e0e4e93cf5 100644 --- a/src/libcore/path.rs +++ b/src/libcore/path.rs @@ -241,7 +241,7 @@ mod stat { } -impl Path { +pub impl Path { fn stat(&self) -> Option<libc::stat> { unsafe { do str::as_c_str(self.to_str()) |buf| { @@ -290,7 +290,7 @@ impl Path { #[cfg(target_os = "freebsd")] #[cfg(target_os = "linux")] #[cfg(target_os = "macos")] -impl Path { +pub impl Path { fn get_atime(&self) -> Option<(i64, int)> { match self.stat() { None => None, @@ -324,7 +324,7 @@ impl Path { #[cfg(target_os = "freebsd")] #[cfg(target_os = "macos")] -impl Path { +pub impl Path { fn get_birthtime(&self) -> Option<(i64, int)> { match self.stat() { None => None, @@ -337,7 +337,7 @@ impl Path { } #[cfg(target_os = "win32")] -impl Path { +pub impl Path { fn get_atime(&self) -> Option<(i64, int)> { match self.stat() { None => None, diff --git a/src/libcore/pipes.rs b/src/libcore/pipes.rs index a0a29c6b516..6389ec08615 100644 --- a/src/libcore/pipes.rs +++ b/src/libcore/pipes.rs @@ -800,7 +800,7 @@ pub fn SendPacketBuffered<T,Tbuffer>(p: *Packet<T>) } } -impl<T,Tbuffer> SendPacketBuffered<T,Tbuffer> { +pub impl<T,Tbuffer> SendPacketBuffered<T,Tbuffer> { fn unwrap() -> *Packet<T> { let mut p = None; p <-> self.p; @@ -857,7 +857,7 @@ impl<T:Owned,Tbuffer:Owned> ::ops::Drop for RecvPacketBuffered<T,Tbuffer> { } } -impl<T:Owned,Tbuffer:Owned> RecvPacketBuffered<T, Tbuffer> { +pub impl<T:Owned,Tbuffer:Owned> RecvPacketBuffered<T, Tbuffer> { fn unwrap() -> *Packet<T> { let mut p = None; p <-> self.p; diff --git a/src/libcore/private.rs b/src/libcore/private.rs index e4fab18966c..7968fdce46e 100644 --- a/src/libcore/private.rs +++ b/src/libcore/private.rs @@ -335,7 +335,7 @@ fn LittleLock() -> LittleLock { } } -impl LittleLock { +pub impl LittleLock { #[inline(always)] unsafe fn lock<T>(f: fn() -> T) -> T { struct Unlock { @@ -381,7 +381,7 @@ impl<T:Owned> Clone for Exclusive<T> { } } -impl<T:Owned> Exclusive<T> { +pub impl<T:Owned> Exclusive<T> { // Exactly like std::arc::mutex_arc,access(), but with the little_lock // instead of a proper mutex. Same reason for being unsafe. // diff --git a/src/libcore/private/extfmt.rs b/src/libcore/private/extfmt.rs index 36ea67ea695..616d37a133a 100644 --- a/src/libcore/private/extfmt.rs +++ b/src/libcore/private/extfmt.rs @@ -142,7 +142,7 @@ pub mod ct { next: uint } - impl<T> Parsed<T> { + pub impl<T> Parsed<T> { static pure fn new(val: T, next: uint) -> Parsed<T> { Parsed {val: val, next: next} } diff --git a/src/libcore/rand.rs b/src/libcore/rand.rs index 15362f89e3f..04a551740a8 100644 --- a/src/libcore/rand.rs +++ b/src/libcore/rand.rs @@ -141,7 +141,7 @@ pub struct Weighted<T> { } /// Extension methods for random number generators -impl Rng { +pub impl Rng { /// Return a random value for a Rand type fn gen<T:Rand>() -> T { Rand::rand(self) diff --git a/src/libcore/reflect.rs b/src/libcore/reflect.rs index ed7e485678e..2a688482f61 100644 --- a/src/libcore/reflect.rs +++ b/src/libcore/reflect.rs @@ -45,7 +45,7 @@ pub fn MovePtrAdaptor<V:TyVisitor + MovePtr>(v: V) -> MovePtrAdaptor<V> { MovePtrAdaptor { inner: v } } -impl<V:TyVisitor + MovePtr> MovePtrAdaptor<V> { +pub impl<V:TyVisitor + MovePtr> MovePtrAdaptor<V> { #[inline(always)] fn bump(sz: uint) { do self.inner.move_ptr() |p| { diff --git a/src/libcore/repr.rs b/src/libcore/repr.rs index 4c3abb09756..ab4bdec266c 100644 --- a/src/libcore/repr.rs +++ b/src/libcore/repr.rs @@ -167,7 +167,7 @@ impl MovePtr for ReprVisitor { } } -impl ReprVisitor { +pub impl ReprVisitor { // Various helpers for the TyVisitor impl diff --git a/src/libcore/result.rs b/src/libcore/result.rs index b03eaeab3e0..ddcd1547841 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -228,7 +228,7 @@ pub pure fn map_err<T:Copy,E,F:Copy>(res: &Result<T, E>, op: fn(&E) -> F) } } -impl<T, E> Result<T, E> { +pub impl<T, E> Result<T, E> { #[inline(always)] pure fn get_ref(&self) -> &self/T { get_ref(self) } @@ -261,7 +261,7 @@ impl<T, E> Result<T, E> { } } -impl<T:Copy,E> Result<T, E> { +pub impl<T:Copy,E> Result<T, E> { #[inline(always)] pure fn get(&self) -> T { get(self) } @@ -271,7 +271,7 @@ impl<T:Copy,E> Result<T, E> { } } -impl<T, E: Copy> Result<T, E> { +pub impl<T, E: Copy> Result<T, E> { #[inline(always)] pure fn get_err(&self) -> E { get_err(self) } diff --git a/src/libcore/task/mod.rs b/src/libcore/task/mod.rs index 2a640e4bf8c..49507897392 100644 --- a/src/libcore/task/mod.rs +++ b/src/libcore/task/mod.rs @@ -232,7 +232,7 @@ priv impl TaskBuilder { } } -impl TaskBuilder { +pub impl TaskBuilder { /** * Decouple the child task's failure from the parent's. If either fails, * the other will not be killed. |
