From 107bf96ff0dcc427c1842ffb232d29afaea53ca5 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 26 Feb 2013 17:47:41 -0800 Subject: [PATCH] librustc: Mark all type implementations public. rs=impl-publicity --- src/libcore/cell.rs | 2 +- src/libcore/comm.rs | 6 +++--- src/libcore/condition.rs | 4 ++-- src/libcore/dlist.rs | 6 +++--- src/libcore/dvec.rs | 4 ++-- src/libcore/mutable.rs | 2 +- src/libcore/option.rs | 6 +++--- src/libcore/path.rs | 8 ++++---- src/libcore/pipes.rs | 4 ++-- src/libcore/private.rs | 4 ++-- src/libcore/private/extfmt.rs | 2 +- src/libcore/rand.rs | 2 +- src/libcore/reflect.rs | 2 +- src/libcore/repr.rs | 2 +- src/libcore/result.rs | 6 +++--- src/libcore/task/mod.rs | 2 +- src/librustc/middle/astencode.rs | 2 +- src/librustc/middle/borrowck/check_loans.rs | 4 ++-- src/librustc/middle/borrowck/gather_loans.rs | 2 +- src/librustc/middle/borrowck/loan.rs | 2 +- src/librustc/middle/borrowck/mod.rs | 2 +- src/librustc/middle/borrowck/preserve.rs | 6 +++--- src/librustc/middle/lang_items.rs | 2 +- src/librustc/middle/lint.rs | 2 +- src/librustc/middle/liveness.rs | 8 ++++---- src/librustc/middle/mem_categorization.rs | 2 +- src/librustc/middle/moves.rs | 4 ++-- src/librustc/middle/trans/expr.rs | 2 +- src/librustc/middle/ty.rs | 2 +- src/librustc/middle/typeck/infer/coercion.rs | 2 +- src/librustc/middle/typeck/infer/mod.rs | 4 ++-- .../middle/typeck/infer/region_inference.rs | 2 +- src/librustc/middle/typeck/infer/test.rs | 2 +- src/librustdoc/doc.rs | 4 ++-- src/librustdoc/sort_item_type_pass.rs | 2 +- src/libstd/arc.rs | 12 +++++------ src/libstd/arena.rs | 2 +- src/libstd/bitv.rs | 8 ++++---- src/libstd/deque.rs | 2 +- src/libstd/ebml.rs | 6 +++--- src/libstd/future.rs | 4 ++-- src/libstd/net_tcp.rs | 2 +- src/libstd/oldmap.rs | 6 +++--- src/libstd/priority_queue.rs | 2 +- src/libstd/sort.rs | 2 +- src/libstd/sync.rs | 20 +++++++++---------- src/libstd/time.rs | 4 ++-- src/libstd/treemap.rs | 8 ++++---- src/libstd/workcache.rs | 10 +++++----- src/libsyntax/ast.rs | 2 +- src/libsyntax/ext/deriving.rs | 2 +- src/test/auxiliary/impl_privacy_xc_1.rs | 2 +- src/test/auxiliary/issue_2472_b.rs | 2 +- src/test/bench/core-set.rs | 2 +- src/test/bench/noise.rs | 2 +- src/test/compile-fail/assign-to-method.rs | 2 +- .../compile-fail/borrowck-autoref-3261.rs | 2 +- ...borrowck-call-method-from-mut-aliasable.rs | 2 +- .../borrowck-insert-during-each.rs | 2 +- .../borrowck-loan-rcvr-overloaded-op.rs | 2 +- src/test/compile-fail/class-cast-to-trait.rs | 2 +- src/test/compile-fail/issue-2356.rs | 2 +- src/test/compile-fail/issue-2766-a.rs | 2 +- src/test/compile-fail/issue-3021-b.rs | 2 +- src/test/compile-fail/issue-3080.rs | 2 +- src/test/compile-fail/issue-3311.rs | 2 +- src/test/compile-fail/issue-3707.rs | 2 +- src/test/compile-fail/issue-3763.rs | 2 +- .../compile-fail/mutable-class-fields-2.rs | 2 +- src/test/compile-fail/regions-addr-of-self.rs | 2 +- .../regions-addr-of-upvar-self.rs | 2 +- .../compile-fail/trait-or-new-type-instead.rs | 2 +- .../use-after-move-self-based-on-type.rs | 2 +- src/test/compile-fail/use-after-move-self.rs | 2 +- src/test/run-pass/anon-trait-static-method.rs | 2 +- src/test/run-pass/auto-ref-newtype.rs | 2 +- .../autoderef-and-borrow-method-receiver.rs | 2 +- .../borrowck-wg-borrow-mut-to-imm-3.rs | 2 +- .../class-cast-to-trait-multiple-types.rs | 4 ++-- src/test/run-pass/class-cast-to-trait.rs | 2 +- .../class-impl-very-parameterized-trait.rs | 4 ++-- .../class-implement-trait-cross-crate.rs | 2 +- src/test/run-pass/class-implement-traits.rs | 2 +- src/test/run-pass/class-methods.rs | 2 +- src/test/run-pass/class-poly-methods.rs | 2 +- src/test/run-pass/class-separate-impl.rs | 2 +- src/test/run-pass/class-typarams.rs | 2 +- src/test/run-pass/classes-simple-method.rs | 2 +- src/test/run-pass/classes.rs | 2 +- .../run-pass/coerce-reborrow-imm-ptr-rcvr.rs | 2 +- .../run-pass/coerce-reborrow-mut-ptr-rcvr.rs | 2 +- src/test/run-pass/const-enum-byref-self.rs | 2 +- src/test/run-pass/explicit-self-closures.rs | 2 +- src/test/run-pass/explicit-self-generic.rs | 2 +- src/test/run-pass/explicit-self.rs | 4 ++-- src/test/run-pass/impl-implicit-trait.rs | 4 ++-- src/test/run-pass/issue-2311-2.rs | 2 +- src/test/run-pass/issue-2312.rs | 2 +- src/test/run-pass/issue-2445-b.rs | 4 ++-- src/test/run-pass/issue-2445.rs | 4 ++-- src/test/run-pass/issue-2487-a.rs | 2 +- src/test/run-pass/issue-2502.rs | 2 +- src/test/run-pass/issue-3220.rs | 2 +- src/test/run-pass/issue-3447.rs | 2 +- src/test/run-pass/issue-3860.rs | 2 +- src/test/run-pass/issue-3904.rs | 2 +- src/test/run-pass/max-min-classes.rs | 2 +- src/test/run-pass/move-self.rs | 2 +- src/test/run-pass/nested-class.rs | 2 +- .../operator-overloading-explicit-self.rs | 2 +- src/test/run-pass/private-class-field.rs | 2 +- src/test/run-pass/private-method.rs | 2 +- src/test/run-pass/reflect-visit-data.rs | 4 ++-- src/test/run-pass/resource-destruct.rs | 2 +- 114 files changed, 175 insertions(+), 175 deletions(-) diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 5887df6802f5..6c35c62c3a70 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -28,7 +28,7 @@ pub pure fn empty_cell() -> Cell { Cell { value: None } } -impl Cell { +pub impl Cell { /// 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 7939644e51cb..da69cd984cd6 100644 --- a/src/libcore/comm.rs +++ b/src/libcore/comm.rs @@ -190,7 +190,7 @@ pub fn PortSet() -> PortSet{ } } -impl PortSet { +pub impl PortSet { fn add(port: Port) { self.ports.push(port) @@ -323,12 +323,12 @@ pub fn oneshot() -> (PortOne, ChanOne) { (port, chan) } -impl PortOne { +pub impl PortOne { fn recv(self) -> T { recv_one(self) } fn try_recv(self) -> Option { try_recv_one(self) } } -impl ChanOne { +pub impl ChanOne { 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 a7c8c1f4d660..00048beae5ac 100644 --- a/src/libcore/condition.rs +++ b/src/libcore/condition.rs @@ -25,7 +25,7 @@ pub struct Condition { key: task::local_data::LocalDataKey> } -impl Condition { +pub impl Condition { fn trap(&self, h: &self/fn(T) -> U) -> Trap/&self { unsafe { let p : *RustClosure = ::cast::transmute(&h); @@ -69,7 +69,7 @@ struct Trap { handler: @Handler } -impl Trap { +pub impl Trap { fn in(&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 358073648892..f1f4e5586610 100644 --- a/src/libcore/dlist.rs +++ b/src/libcore/dlist.rs @@ -62,7 +62,7 @@ priv impl DListNode { } } -impl DListNode { +pub impl DListNode { /// Get the next node in the list, if there is one. pure fn next_link(@mut self) -> DListLink { self.assert_links(); @@ -208,7 +208,7 @@ priv impl DList { } } -impl DList { +pub impl DList { /// 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 DList { } } -impl DList { +pub impl DList { /// Remove data from the head of the list. O(1). fn pop(@mut self) -> Option { self.pop_n().map(|nobe| nobe.data) diff --git a/src/libcore/dvec.rs b/src/libcore/dvec.rs index 9f2036c5f41a..6c7c195b9d30 100644 --- a/src/libcore/dvec.rs +++ b/src/libcore/dvec.rs @@ -117,7 +117,7 @@ priv impl DVec { // 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 DVec { +pub impl DVec { /// Reserves space for N elements fn reserve(count: uint) { vec::reserve(&mut self.data, count) @@ -215,7 +215,7 @@ impl DVec { } } -impl DVec { +pub impl DVec { /** * 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 1fb855520ba4..f888fbdb40cc 100644 --- a/src/libcore/mutable.rs +++ b/src/libcore/mutable.rs @@ -43,7 +43,7 @@ pub fn unwrap(m: Mut) -> T { value } -impl Data { +pub impl Data { fn borrow_mut(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 12ed0df00762..53944c4c2c82 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -281,7 +281,7 @@ pub pure fn expect(opt: Option, reason: &str) -> T { } } -impl Option { +pub impl Option { /// Returns true if the option equals `none` #[inline(always)] pure fn is_none(&self) -> bool { is_none(self) } @@ -393,7 +393,7 @@ impl Option { pure fn expect(self, reason: &str) -> T { expect(self, reason) } } -impl Option { +pub impl Option { /** Gets the value out of an option @@ -421,7 +421,7 @@ impl Option { } } -impl Option { +pub impl Option { #[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 1753862649f5..4e0e4e93cf5a 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 { 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 a0a29c6b5160..6389ec086159 100644 --- a/src/libcore/pipes.rs +++ b/src/libcore/pipes.rs @@ -800,7 +800,7 @@ pub fn SendPacketBuffered(p: *Packet) } } -impl SendPacketBuffered { +pub impl SendPacketBuffered { fn unwrap() -> *Packet { let mut p = None; p <-> self.p; @@ -857,7 +857,7 @@ impl ::ops::Drop for RecvPacketBuffered { } } -impl RecvPacketBuffered { +pub impl RecvPacketBuffered { fn unwrap() -> *Packet { let mut p = None; p <-> self.p; diff --git a/src/libcore/private.rs b/src/libcore/private.rs index e4fab18966ca..7968fdce46e7 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(f: fn() -> T) -> T { struct Unlock { @@ -381,7 +381,7 @@ impl Clone for Exclusive { } } -impl Exclusive { +pub impl Exclusive { // 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 36ea67ea6954..616d37a133a9 100644 --- a/src/libcore/private/extfmt.rs +++ b/src/libcore/private/extfmt.rs @@ -142,7 +142,7 @@ pub mod ct { next: uint } - impl Parsed { + pub impl Parsed { static pure fn new(val: T, next: uint) -> Parsed { Parsed {val: val, next: next} } diff --git a/src/libcore/rand.rs b/src/libcore/rand.rs index 15362f89e3fb..04a551740a80 100644 --- a/src/libcore/rand.rs +++ b/src/libcore/rand.rs @@ -141,7 +141,7 @@ pub struct Weighted { } /// Extension methods for random number generators -impl Rng { +pub impl Rng { /// Return a random value for a Rand type fn gen() -> T { Rand::rand(self) diff --git a/src/libcore/reflect.rs b/src/libcore/reflect.rs index ed7e485678e1..2a688482f618 100644 --- a/src/libcore/reflect.rs +++ b/src/libcore/reflect.rs @@ -45,7 +45,7 @@ pub fn MovePtrAdaptor(v: V) -> MovePtrAdaptor { MovePtrAdaptor { inner: v } } -impl MovePtrAdaptor { +pub impl MovePtrAdaptor { #[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 4c3abb09756e..ab4bdec266cb 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 b03eaeab3e0c..ddcd1547841d 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -228,7 +228,7 @@ pub pure fn map_err(res: &Result, op: fn(&E) -> F) } } -impl Result { +pub impl Result { #[inline(always)] pure fn get_ref(&self) -> &self/T { get_ref(self) } @@ -261,7 +261,7 @@ impl Result { } } -impl Result { +pub impl Result { #[inline(always)] pure fn get(&self) -> T { get(self) } @@ -271,7 +271,7 @@ impl Result { } } -impl Result { +pub impl Result { #[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 2a640e4bf8cf..49507897392d 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. diff --git a/src/librustc/middle/astencode.rs b/src/librustc/middle/astencode.rs index 58433cec2725..d6af38739992 100644 --- a/src/librustc/middle/astencode.rs +++ b/src/librustc/middle/astencode.rs @@ -167,7 +167,7 @@ fn reserve_id_range(sess: Session, ast_util::id_range { min: to_id_min, max: to_id_min } } -impl ExtendedDecodeContext { +pub impl ExtendedDecodeContext { fn tr_id(&self, id: ast::node_id) -> ast::node_id { /*! * diff --git a/src/librustc/middle/borrowck/check_loans.rs b/src/librustc/middle/borrowck/check_loans.rs index afefec00c504..f1e52d00beed 100644 --- a/src/librustc/middle/borrowck/check_loans.rs +++ b/src/librustc/middle/borrowck/check_loans.rs @@ -89,7 +89,7 @@ enum assignment_type { at_swap } -impl assignment_type { +pub impl assignment_type { fn checked_by_liveness(&self) -> bool { // the liveness pass guarantees that immutable local variables // are only assigned once; but it doesn't consider &mut @@ -106,7 +106,7 @@ impl assignment_type { } } -impl CheckLoanCtxt { +pub impl CheckLoanCtxt { fn tcx(@mut self) -> ty::ctxt { self.bccx.tcx } fn purity(@mut self, scope_id: ast::node_id) -> Option { diff --git a/src/librustc/middle/borrowck/gather_loans.rs b/src/librustc/middle/borrowck/gather_loans.rs index 546e9359a32d..c997b4a6b5f4 100644 --- a/src/librustc/middle/borrowck/gather_loans.rs +++ b/src/librustc/middle/borrowck/gather_loans.rs @@ -289,7 +289,7 @@ fn req_loans_in_expr(ex: @ast::expr, self.root_ub = old_root_ub; } -impl GatherLoanCtxt { +pub impl GatherLoanCtxt { fn tcx(@mut self) -> ty::ctxt { self.bccx.tcx } fn guarantee_adjustments(@mut self, diff --git a/src/librustc/middle/borrowck/loan.rs b/src/librustc/middle/borrowck/loan.rs index c39f2455c2f8..e095c9709313 100644 --- a/src/librustc/middle/borrowck/loan.rs +++ b/src/librustc/middle/borrowck/loan.rs @@ -87,7 +87,7 @@ struct LoanContext { loans: ~[Loan] } -impl LoanContext { +pub impl LoanContext { fn tcx(&self) -> ty::ctxt { self.bccx.tcx } fn loan(&mut self, diff --git a/src/librustc/middle/borrowck/mod.rs b/src/librustc/middle/borrowck/mod.rs index eb2a93d86f9a..b432d5a399ad 100644 --- a/src/librustc/middle/borrowck/mod.rs +++ b/src/librustc/middle/borrowck/mod.rs @@ -433,7 +433,7 @@ pub fn save_and_restore_managed(save_and_restore_t: @mut T, u } -impl LoanKind { +pub impl LoanKind { fn is_freeze(&self) -> bool { match *self { TotalFreeze | PartialFreeze => true, diff --git a/src/librustc/middle/borrowck/preserve.rs b/src/librustc/middle/borrowck/preserve.rs index a123793e20b2..aabcd7a2fe5b 100644 --- a/src/librustc/middle/borrowck/preserve.rs +++ b/src/librustc/middle/borrowck/preserve.rs @@ -35,7 +35,7 @@ pub enum PreserveCondition { PcIfPure(bckerr) } -impl PreserveCondition { +pub impl PreserveCondition { // combines two preservation conditions such that if either of // them requires purity, the result requires purity fn combine(&self, pc: PreserveCondition) -> PreserveCondition { @@ -46,7 +46,7 @@ impl PreserveCondition { } } -impl BorrowckCtxt { +pub impl BorrowckCtxt { fn preserve(&self, cmt: cmt, scope_region: ty::Region, @@ -80,7 +80,7 @@ struct PreserveCtxt { root_managed_data: bool } -impl PreserveCtxt { +pub impl PreserveCtxt { fn tcx(&self) -> ty::ctxt { self.bccx.tcx } fn preserve(&self, cmt: cmt) -> bckres { diff --git a/src/librustc/middle/lang_items.rs b/src/librustc/middle/lang_items.rs index 84871f749647..16f1d36e05c7 100644 --- a/src/librustc/middle/lang_items.rs +++ b/src/librustc/middle/lang_items.rs @@ -322,7 +322,7 @@ struct LanguageItemCollector { item_refs: HashMap<@~str, uint>, } -impl LanguageItemCollector { +pub impl LanguageItemCollector { fn match_and_collect_meta_item(&self, item_def_id: def_id, meta_item: meta_item) { match meta_item.node { diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs index eb418d0cd5ac..b14245afa9a1 100644 --- a/src/librustc/middle/lint.rs +++ b/src/librustc/middle/lint.rs @@ -331,7 +331,7 @@ struct Context { sess: Session } -impl Context { +pub impl Context { fn get_level(&self, lint: lint) -> level { get_lint_level(self.curr, lint) } diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs index 96aa41f78091..3753c93f13ad 100644 --- a/src/librustc/middle/liveness.rs +++ b/src/librustc/middle/liveness.rs @@ -254,7 +254,7 @@ impl to_str::ToStr for Variable { // variable must not be assigned if there is some successor // assignment. And so forth. -impl LiveNode { +pub impl LiveNode { pure fn is_valid(&self) -> bool { **self != uint::max_value } } @@ -334,7 +334,7 @@ fn IrMaps(tcx: ty::ctxt, } } -impl IrMaps { +pub impl IrMaps { fn add_live_node(&mut self, lnk: LiveNodeKind) -> LiveNode { let ln = LiveNode(self.num_live_nodes); self.lnks.push(lnk); @@ -693,7 +693,7 @@ fn Liveness(ir: @mut IrMaps, specials: Specials) -> Liveness { } } -impl Liveness { +pub impl Liveness { fn live_node(&self, node_id: node_id, span: span) -> LiveNode { match self.ir.live_node_map.find(&node_id) { Some(ln) => ln, @@ -1649,7 +1649,7 @@ enum ReadKind { PartiallyMovedValue } -impl @Liveness { +pub impl @Liveness { fn check_ret(&self, id: node_id, sp: span, _fk: visit::fn_kind, entry_ln: LiveNode) { if self.live_on_entry(entry_ln, self.s.no_ret_var).is_some() { diff --git a/src/librustc/middle/mem_categorization.rs b/src/librustc/middle/mem_categorization.rs index 3f8ee61e8412..227d262a79e1 100644 --- a/src/librustc/middle/mem_categorization.rs +++ b/src/librustc/middle/mem_categorization.rs @@ -312,7 +312,7 @@ impl ToStr for MutabilityCategory { } } -impl MutabilityCategory { +pub impl MutabilityCategory { static fn from_mutbl(&self, m: ast::mutability) -> MutabilityCategory { match m { m_imm => McImmutable, diff --git a/src/librustc/middle/moves.rs b/src/librustc/middle/moves.rs index b23066c1d969..d5adfee65af9 100644 --- a/src/librustc/middle/moves.rs +++ b/src/librustc/middle/moves.rs @@ -301,7 +301,7 @@ fn compute_modes_for_expr(expr: @expr, cx.consume_expr(expr, v); } -impl UseMode { +pub impl UseMode { fn component_mode(&self, expr: @expr) -> UseMode { /*! * @@ -316,7 +316,7 @@ impl UseMode { } } -impl VisitContext { +pub impl VisitContext { fn consume_exprs(&self, exprs: &[@expr], visitor: vt) diff --git a/src/librustc/middle/trans/expr.rs b/src/librustc/middle/trans/expr.rs index 6226e83d046b..0dd30af4b719 100644 --- a/src/librustc/middle/trans/expr.rs +++ b/src/librustc/middle/trans/expr.rs @@ -154,7 +154,7 @@ pub enum Dest { Ignore, } -impl Dest { +pub impl Dest { fn to_str(&self, ccx: @CrateContext) -> ~str { match *self { SaveIn(v) => fmt!("SaveIn(%s)", val_str(ccx.tn, v)), diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 8431426fc1b5..7105017cd88d 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -3714,7 +3714,7 @@ pub enum DtorKind { TraitDtor(def_id) } -impl DtorKind { +pub impl DtorKind { pure fn is_not_present(&const self) -> bool { match *self { NoDtor => true, diff --git a/src/librustc/middle/typeck/infer/coercion.rs b/src/librustc/middle/typeck/infer/coercion.rs index 5d291fdde77b..6ad58bc5d4f4 100644 --- a/src/librustc/middle/typeck/infer/coercion.rs +++ b/src/librustc/middle/typeck/infer/coercion.rs @@ -87,7 +87,7 @@ use syntax::ast; // function. pub enum Coerce = CombineFields; -impl Coerce { +pub impl Coerce { fn tys(&self, a: ty::t, b: ty::t) -> CoerceResult { debug!("Coerce.tys(%s => %s)", a.inf_str(self.infcx), diff --git a/src/librustc/middle/typeck/infer/mod.rs b/src/librustc/middle/typeck/infer/mod.rs index 8bb1f2f47e5e..aff2d599a0ef 100644 --- a/src/librustc/middle/typeck/infer/mod.rs +++ b/src/librustc/middle/typeck/infer/mod.rs @@ -551,7 +551,7 @@ struct Snapshot { region_vars_snapshot: uint, } -impl @mut InferCtxt { +pub impl @mut InferCtxt { fn combine_fields(&self, a_is_expected: bool, span: span) -> CombineFields { CombineFields {infcx: *self, @@ -643,7 +643,7 @@ fn next_simple_var( return id; } -impl @mut InferCtxt { +pub impl @mut InferCtxt { fn next_ty_var_id(&self) -> TyVid { let id = self.ty_var_counter; self.ty_var_counter += 1; diff --git a/src/librustc/middle/typeck/infer/region_inference.rs b/src/librustc/middle/typeck/infer/region_inference.rs index ee5986866525..d016a6f790a6 100644 --- a/src/librustc/middle/typeck/infer/region_inference.rs +++ b/src/librustc/middle/typeck/infer/region_inference.rs @@ -1218,7 +1218,7 @@ fn TwoRegionsMap() -> TwoRegionsMap { return HashMap(); } -impl RegionVarBindings { +pub impl RegionVarBindings { fn infer_variable_values(&mut self) -> ~[GraphNodeValue] { let mut graph = self.construct_graph(); self.expansion(&mut graph); diff --git a/src/librustc/middle/typeck/infer/test.rs b/src/librustc/middle/typeck/infer/test.rs index 27355da4b9ae..9701e370ca8c 100644 --- a/src/librustc/middle/typeck/infer/test.rs +++ b/src/librustc/middle/typeck/infer/test.rs @@ -79,7 +79,7 @@ fn setup_env(test_name: &str, source_string: &str) -> Env { err_messages: messages}; } -impl Env { +pub impl Env { fn create_region_hierarchy(&self, rh: &RH) { for rh.sub.each |child_rh| { self.create_region_hierarchy(child_rh); diff --git a/src/librustdoc/doc.rs b/src/librustdoc/doc.rs index 40617e13b8d5..f7de1997d537 100644 --- a/src/librustdoc/doc.rs +++ b/src/librustdoc/doc.rs @@ -174,7 +174,7 @@ pub struct IndexEntry { link: ~str } -impl Doc { +pub impl Doc { fn CrateDoc(&self) -> CrateDoc { option::get(vec::foldl(None, self.pages, |_m, page| { match copy *page { @@ -190,7 +190,7 @@ impl Doc { } /// Some helper methods on ModDoc, mostly for testing -impl ModDoc { +pub impl ModDoc { fn mods(&self) -> ~[ModDoc] { do vec::filter_mapped(self.items) |itemtag| { match copy *itemtag { diff --git a/src/librustdoc/sort_item_type_pass.rs b/src/librustdoc/sort_item_type_pass.rs index 646dc12d336e..1a370947d698 100644 --- a/src/librustdoc/sort_item_type_pass.rs +++ b/src/librustdoc/sort_item_type_pass.rs @@ -51,7 +51,7 @@ fn test() { fn ifn() { } \ enum ienum { ivar } \ trait itrait { fn a(); } \ - impl int { fn a() { } } \ + pub impl int { fn a() { } } \ type itype = int; \ struct istruct { f: () }"; do astsrv::from_str(source) |srv| { diff --git a/src/libstd/arc.rs b/src/libstd/arc.rs index f258e649122b..1e2abbe02874 100644 --- a/src/libstd/arc.rs +++ b/src/libstd/arc.rs @@ -30,7 +30,7 @@ use core::util; /// As sync::condvar, a mechanism for unlock-and-descheduling and signalling. pub struct Condvar { is_mutex: bool, failed: &mut bool, cond: &sync::Condvar } -impl &Condvar { +pub impl &Condvar { /// Atomically exit the associated ARC and block until a signal is sent. #[inline(always)] fn wait() { self.wait_on(0) } @@ -158,7 +158,7 @@ impl Clone for MutexARC { } } -impl &MutexARC { +pub impl &MutexARC { /** * Access the underlying mutable data with mutual exclusion from other @@ -301,7 +301,7 @@ pub fn rw_arc_with_condvars( RWARC { x: unsafe { shared_mutable_state(data) }, cant_nest: () } } -impl RWARC { +pub impl RWARC { /// Duplicate a rwlock-protected ARC, as arc::clone. fn clone(&self) -> RWARC { RWARC { x: unsafe { clone_shared_mutable_state(&self.x) }, @@ -310,7 +310,7 @@ impl RWARC { } -impl &RWARC { +pub impl &RWARC { /** * Access the underlying data mutably. Locks the rwlock in write mode; * other readers and writers will block. @@ -445,7 +445,7 @@ pub enum RWWriteMode = /// The "read permission" token used for RWARC.write_downgrade(). pub enum RWReadMode = (&T, sync::RWlockReadMode); -impl &RWWriteMode { +pub impl &RWWriteMode { /// Access the pre-downgrade RWARC in write mode. fn write(blk: fn(x: &mut T) -> U) -> U { match *self { @@ -475,7 +475,7 @@ impl &RWWriteMode { } } -impl &RWReadMode { +pub impl &RWReadMode { /// Access the post-downgrade rwlock in read mode. fn read(blk: fn(x: &T) -> U) -> U { match *self { diff --git a/src/libstd/arena.rs b/src/libstd/arena.rs index 177932aa072a..a30ee94a42b0 100644 --- a/src/libstd/arena.rs +++ b/src/libstd/arena.rs @@ -161,7 +161,7 @@ unsafe fn un_bitpack_tydesc_ptr(p: uint) -> (*TypeDesc, bool) { (reinterpret_cast(&(p & !1)), p & 1 == 1) } -impl &Arena { +pub impl &Arena { // Functions for the POD part of the arena fn alloc_pod_grow(n_bytes: uint, align: uint) -> *u8 { // Allocate a new chunk. diff --git a/src/libstd/bitv.rs b/src/libstd/bitv.rs index 30d7b825add4..cf278b07c9d9 100644 --- a/src/libstd/bitv.rs +++ b/src/libstd/bitv.rs @@ -27,7 +27,7 @@ fn small_mask(nbits: uint) -> uint { (1 << nbits) - 1 } -impl SmallBitv { +pub impl SmallBitv { static fn new(bits: uint) -> SmallBitv { SmallBitv {bits: bits} } @@ -124,7 +124,7 @@ fn big_mask(nbits: uint, elem: uint) -> uint { } } -impl BigBitv { +pub impl BigBitv { static fn new(storage: ~[uint]) -> BigBitv { BigBitv {storage: storage} } @@ -256,7 +256,7 @@ priv impl Bitv { } -impl Bitv { +pub impl Bitv { static fn new(nbits: uint, init: bool) -> Bitv { let rep = if nbits <= uint::bits { Small(~SmallBitv::new(if init {!0} else {0})) @@ -591,7 +591,7 @@ pub struct BitvSet { priv bitv: BigBitv } -impl BitvSet { +pub impl BitvSet { /// Creates a new bit vector set with initially no contents static fn new() -> BitvSet { BitvSet{ size: 0, bitv: BigBitv::new(~[0]) } diff --git a/src/libstd/deque.rs b/src/libstd/deque.rs index 0ac76cefd6b3..4d8c60a6614b 100644 --- a/src/libstd/deque.rs +++ b/src/libstd/deque.rs @@ -37,7 +37,7 @@ impl Mutable for Deque { } } -impl Deque { +pub impl Deque { static pure fn new() -> Deque { Deque{nelts: 0, lo: 0, hi: 0, elts: vec::from_fn(initial_capacity, |_| None)} diff --git a/src/libstd/ebml.rs b/src/libstd/ebml.rs index 84df1785503d..7d04f6760793 100644 --- a/src/libstd/ebml.rs +++ b/src/libstd/ebml.rs @@ -279,7 +279,7 @@ pub mod reader { } } - impl Decoder { + pub impl Decoder { fn read_opaque(&self, op: fn(Doc) -> R) -> R { do self.push_doc(self.next_doc(EsOpaque)) { op(copy self.parent) @@ -451,7 +451,7 @@ pub mod writer { } // FIXME (#2741): Provide a function to write the standard ebml header. - impl Encoder { + pub impl Encoder { fn start_tag(tag_id: uint) { debug!("Start tag %u", tag_id); @@ -571,7 +571,7 @@ pub mod writer { } } - impl Encoder { + pub impl Encoder { fn emit_opaque(&self, f: fn()) { do self.wr_tag(EsOpaque as uint) { f() diff --git a/src/libstd/future.rs b/src/libstd/future.rs index 7f48466ed0a8..b9c7c9f3a138 100644 --- a/src/libstd/future.rs +++ b/src/libstd/future.rs @@ -49,14 +49,14 @@ priv enum FutureState { } /// Methods on the `future` type -impl Future { +pub impl Future { fn get() -> A { //! Get the value of the future *(self.get_ref()) } } -impl Future { +pub impl Future { pure fn get_ref(&self) -> &self/A { /*! diff --git a/src/libstd/net_tcp.rs b/src/libstd/net_tcp.rs index 8835cdfb105e..dcbf7e60d895 100644 --- a/src/libstd/net_tcp.rs +++ b/src/libstd/net_tcp.rs @@ -820,7 +820,7 @@ pub fn socket_buf(sock: TcpSocket) -> TcpSocketBuf { } /// Convenience methods extending `net::tcp::tcp_socket` -impl TcpSocket { +pub impl TcpSocket { pub fn read_start() -> result::Result<@Port< result::Result<~[u8], TcpErrData>>, TcpErrData> { read_start(&self) diff --git a/src/libstd/oldmap.rs b/src/libstd/oldmap.rs index 53692cd3be57..c1227f6b077b 100644 --- a/src/libstd/oldmap.rs +++ b/src/libstd/oldmap.rs @@ -168,7 +168,7 @@ pub mod chained { } } - impl T { + pub impl T { pure fn contains_key(&self, k: &K) -> bool { let hash = k.hash_keyed(0,0) as uint; match self.search_tbl(k, hash) { @@ -252,7 +252,7 @@ pub mod chained { } } - impl T { + pub impl T { pure fn find(&self, k: &K) -> Option { match self.search_tbl(k, k.hash_keyed(0,0) as uint) { NotFound => None, @@ -325,7 +325,7 @@ pub mod chained { } } - impl T { + pub impl T { fn to_writer(wr: io::Writer) { if self.count == 0u { wr.write_str(~"{}"); diff --git a/src/libstd/priority_queue.rs b/src/libstd/priority_queue.rs index f642bf52f659..4b92bd7543a7 100644 --- a/src/libstd/priority_queue.rs +++ b/src/libstd/priority_queue.rs @@ -48,7 +48,7 @@ impl Mutable for PriorityQueue { fn clear(&mut self) { self.data.truncate(0) } } -impl PriorityQueue { +pub impl PriorityQueue { /// Returns the greatest item in the queue - fails if empty pure fn top(&self) -> &self/T { &self.data[0] } diff --git a/src/libstd/sort.rs b/src/libstd/sort.rs index 75f38da5a19a..43fab9df1631 100644 --- a/src/libstd/sort.rs +++ b/src/libstd/sort.rs @@ -404,7 +404,7 @@ fn MergeState() -> MergeState { } } -impl MergeState { +pub impl MergeState { fn push_run(&self, run_base: uint, run_len: uint) { let tmp = RunState{base: run_base, len: run_len}; self.runs.push(tmp); diff --git a/src/libstd/sync.rs b/src/libstd/sync.rs index 1ff51e8bff03..22325e6a83c6 100644 --- a/src/libstd/sync.rs +++ b/src/libstd/sync.rs @@ -100,7 +100,7 @@ fn new_sem_and_signal(count: int, num_condvars: uint) } #[doc(hidden)] -impl &Sem { +pub impl &Sem { fn acquire() { let mut waiter_nobe = None; unsafe { @@ -136,7 +136,7 @@ impl &Sem { } // FIXME(#3154) move both copies of this into Sem, and unify the 2 structs #[doc(hidden)] -impl &Sem<()> { +pub impl &Sem<()> { fn access(blk: fn() -> U) -> U { let mut release = None; unsafe { @@ -149,7 +149,7 @@ impl &Sem<()> { } } #[doc(hidden)] -impl &Sem<~[Waitqueue]> { +pub impl &Sem<~[Waitqueue]> { fn access(blk: fn() -> U) -> U { let mut release = None; unsafe { @@ -192,7 +192,7 @@ pub struct Condvar { priv sem: &Sem<~[Waitqueue]> } impl Drop for Condvar { fn finalize(&self) {} } -impl &Condvar { +pub impl &Condvar { /** * Atomically drop the associated lock, and block until a signal is sent. * @@ -344,7 +344,7 @@ fn check_cvar_bounds(out_of_bounds: Option, id: uint, act: &str, } #[doc(hidden)] -impl &Sem<~[Waitqueue]> { +pub impl &Sem<~[Waitqueue]> { // The only other place that condvars get built is rwlock_write_mode. fn access_cond(blk: fn(c: &Condvar) -> U) -> U { do self.access { blk(&Condvar { sem: self }) } @@ -370,7 +370,7 @@ impl Clone for Semaphore { } } -impl &Semaphore { +pub impl &Semaphore { /** * Acquire a resource represented by the semaphore. Blocks if necessary * until resource(s) become available. @@ -418,7 +418,7 @@ impl Clone for Mutex { fn clone(&self) -> Mutex { Mutex { sem: Sem((*self.sem).clone()) } } } -impl &Mutex { +pub impl &Mutex { /// Run a function with ownership of the mutex. fn lock(blk: fn() -> U) -> U { (&self.sem).access(blk) } @@ -467,7 +467,7 @@ pub fn rwlock_with_condvars(num_condvars: uint) -> RWlock { read_count: 0 }) } } -impl &RWlock { +pub impl &RWlock { /// Create a new handle to the rwlock. fn clone() -> RWlock { RWlock { order_lock: (&(self.order_lock)).clone(), @@ -688,7 +688,7 @@ impl Drop for RWlockWriteMode { fn finalize(&self) {} } pub struct RWlockReadMode { priv lock: &RWlock } impl Drop for RWlockReadMode { fn finalize(&self) {} } -impl &RWlockWriteMode { +pub impl &RWlockWriteMode { /// Access the pre-downgrade rwlock in write mode. fn write(blk: fn() -> U) -> U { blk() } /// Access the pre-downgrade rwlock in write mode with a condvar. @@ -696,7 +696,7 @@ impl &RWlockWriteMode { blk(&Condvar { sem: &self.lock.access_lock }) } } -impl &RWlockReadMode { +pub impl &RWlockReadMode { /// Access the post-downgrade rwlock in read mode. fn read(blk: fn() -> U) -> U { blk() } } diff --git a/src/libstd/time.rs b/src/libstd/time.rs index c8379d3ef444..15dea83815b2 100644 --- a/src/libstd/time.rs +++ b/src/libstd/time.rs @@ -47,7 +47,7 @@ pub struct Timespec { sec: i64, nsec: i32 } * -1.2 seconds before the epoch is represented by `Timespec { sec: -2_i64, * nsec: 800_000_000_i32 }`. */ -impl Timespec { +pub impl Timespec { static pure fn new(sec: i64, nsec: i32) -> Timespec { assert nsec >= 0 && nsec < NSEC_PER_SEC; Timespec { sec: sec, nsec: nsec } @@ -208,7 +208,7 @@ pub pure fn strftime(format: &str, tm: &Tm) -> ~str { unsafe { do_strftime(format, tm) } } -impl Tm { +pub impl Tm { /// Convert time to the seconds from January 1, 1970 fn to_timespec() -> Timespec { unsafe { diff --git a/src/libstd/treemap.rs b/src/libstd/treemap.rs index 0e593ba42d12..cf863217deb1 100644 --- a/src/libstd/treemap.rs +++ b/src/libstd/treemap.rs @@ -177,7 +177,7 @@ impl Map for TreeMap { } } -impl TreeMap { +pub impl TreeMap { /// Create an empty TreeMap static pure fn new() -> TreeMap { TreeMap{root: None, length: 0} } @@ -208,7 +208,7 @@ pub struct TreeMapIterator { /// tuple with a reference to the key and value. If there are no /// more nodes, return `None`. fn map_next(iter: &mut TreeMapIterator/&r) - -> Option<(&r/K, &r/V)> { + -> Option<(&r/K, &r/V)> { while !iter.stack.is_empty() || iter.node.is_some() { match *iter.node { Some(ref x) => { @@ -480,7 +480,7 @@ impl Set for TreeSet { } } -impl TreeSet { +pub impl TreeSet { /// Create an empty TreeSet static pure fn new() -> TreeSet { TreeSet{map: TreeMap::new()} } @@ -518,7 +518,7 @@ struct TreeNode { level: uint } -impl TreeNode { +pub impl TreeNode { #[inline(always)] static pure fn new(key: K, value: V) -> TreeNode { TreeNode{key: key, value: value, left: None, right: None, level: 1} diff --git a/src/libstd/workcache.rs b/src/libstd/workcache.rs index c85aa78d9834..592ac40e0824 100644 --- a/src/libstd/workcache.rs +++ b/src/libstd/workcache.rs @@ -132,7 +132,7 @@ impl cmp::Ord for WorkKey { } } -impl WorkKey { +pub impl WorkKey { static fn new(kind: &str, name: &str) -> WorkKey { WorkKey { kind: kind.to_owned(), name: name.to_owned() } } @@ -168,7 +168,7 @@ struct Database { mut db_dirty: bool } -impl Database { +pub impl Database { fn prepare(&mut self, fn_name: &str, declared_inputs: &WorkMap) -> Option<(WorkMap, WorkMap, ~str)> { @@ -199,7 +199,7 @@ struct Logger { a: () } -impl Logger { +pub impl Logger { fn info(i: &str) { io::println(~"workcache: " + i.to_owned()); } @@ -254,7 +254,7 @@ fn digest_file(path: &Path) -> ~str { sha.result_str() } -impl Context { +pub impl Context { static fn new(db: @Mut, lg: @Mut, @@ -356,7 +356,7 @@ impl TPrep for @Mut { } } -impl + Decodable> Work { +pub impl+Decodable> Work { static fn new(p: @Mut, e: Either>) -> Work { Work { prep: p, res: Some(e) } } diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index f97244c477b7..c6994125b261 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -162,7 +162,7 @@ pub struct Generics { ty_params: OptVec } -impl Generics { +pub impl Generics { fn is_empty(&self) -> bool { self.lifetimes.len() + self.ty_params.len() == 0 } diff --git a/src/libsyntax/ext/deriving.rs b/src/libsyntax/ext/deriving.rs index 0164f807f4b5..7820bb5e964f 100644 --- a/src/libsyntax/ext/deriving.rs +++ b/src/libsyntax/ext/deriving.rs @@ -38,7 +38,7 @@ enum Junction { Disjunction, } -impl Junction { +pub impl Junction { fn to_binop(self) -> binop { match self { Conjunction => and, diff --git a/src/test/auxiliary/impl_privacy_xc_1.rs b/src/test/auxiliary/impl_privacy_xc_1.rs index 05d5cee47f2c..92452cbe8fdc 100644 --- a/src/test/auxiliary/impl_privacy_xc_1.rs +++ b/src/test/auxiliary/impl_privacy_xc_1.rs @@ -4,7 +4,7 @@ pub struct Fish { x: int } -impl Fish { +pub impl Fish { fn swim(&self) {} } diff --git a/src/test/auxiliary/issue_2472_b.rs b/src/test/auxiliary/issue_2472_b.rs index e1be3adcd4a0..e7a929547255 100644 --- a/src/test/auxiliary/issue_2472_b.rs +++ b/src/test/auxiliary/issue_2472_b.rs @@ -11,7 +11,7 @@ enum S = (); -impl S { +pub impl S { fn foo() { } } diff --git a/src/test/bench/core-set.rs b/src/test/bench/core-set.rs index 2845596e7800..5e73b286530d 100644 --- a/src/test/bench/core-set.rs +++ b/src/test/bench/core-set.rs @@ -31,7 +31,7 @@ fn timed(result: &mut float, op: fn()) { *result = (end - start); } -impl Results { +pub impl Results { fn bench_int>(&mut self, rng: @rand::Rng, num_keys: uint, rand_cap: uint, f: fn() -> T) { { diff --git a/src/test/bench/noise.rs b/src/test/bench/noise.rs index 39caba927329..9825671bc8ae 100644 --- a/src/test/bench/noise.rs +++ b/src/test/bench/noise.rs @@ -40,7 +40,7 @@ fn Noise2DContext() -> ~Noise2DContext { } } -impl Noise2DContext { +pub impl Noise2DContext { #[inline(always)] fn get_gradient(&self, x: int, y: int) -> Vec2 { let idx = self.permutations[x & 255] + self.permutations[y & 255]; diff --git a/src/test/compile-fail/assign-to-method.rs b/src/test/compile-fail/assign-to-method.rs index 7d68d6d0c386..0a2834a95e62 100644 --- a/src/test/compile-fail/assign-to-method.rs +++ b/src/test/compile-fail/assign-to-method.rs @@ -14,7 +14,7 @@ struct cat { how_hungry : int, } -impl cat { +pub impl cat { fn speak() { self.meows += 1u; } } diff --git a/src/test/compile-fail/borrowck-autoref-3261.rs b/src/test/compile-fail/borrowck-autoref-3261.rs index b3ef5f4d481c..068bb7cd7a61 100644 --- a/src/test/compile-fail/borrowck-autoref-3261.rs +++ b/src/test/compile-fail/borrowck-autoref-3261.rs @@ -10,7 +10,7 @@ use core::either::*; enum X = Either<(uint,uint),extern fn()>; -impl &X { +pub impl &X { fn with(blk: fn(x: &Either<(uint,uint),extern fn()>)) { blk(&**self) } diff --git a/src/test/compile-fail/borrowck-call-method-from-mut-aliasable.rs b/src/test/compile-fail/borrowck-call-method-from-mut-aliasable.rs index 4e0cc76bf754..2c68429baec9 100644 --- a/src/test/compile-fail/borrowck-call-method-from-mut-aliasable.rs +++ b/src/test/compile-fail/borrowck-call-method-from-mut-aliasable.rs @@ -12,7 +12,7 @@ struct Foo { x: int, } -impl Foo { +pub impl Foo { fn f(&self) {} fn g(&const self) {} fn h(&mut self) {} diff --git a/src/test/compile-fail/borrowck-insert-during-each.rs b/src/test/compile-fail/borrowck-insert-during-each.rs index e0fca586b6b7..476a790b85ed 100644 --- a/src/test/compile-fail/borrowck-insert-during-each.rs +++ b/src/test/compile-fail/borrowck-insert-during-each.rs @@ -14,7 +14,7 @@ struct Foo { n: LinearSet, } -impl Foo { +pub impl Foo { fn foo(&mut self, fun: fn(&int)) { for self.n.each |f| { fun(f); diff --git a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs index e15edd8cf199..61cf346ffa48 100644 --- a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs +++ b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs @@ -19,7 +19,7 @@ impl ops::Add for Point { } } -impl Point { +pub impl Point { fn times(z: int) -> int { self.x * self.y * z } diff --git a/src/test/compile-fail/class-cast-to-trait.rs b/src/test/compile-fail/class-cast-to-trait.rs index 671298040a90..3169b0299a0b 100644 --- a/src/test/compile-fail/class-cast-to-trait.rs +++ b/src/test/compile-fail/class-cast-to-trait.rs @@ -19,7 +19,7 @@ struct cat { name : ~str, } -impl cat { +pub impl cat { fn eat() -> bool { if self.how_hungry > 0 { diff --git a/src/test/compile-fail/issue-2356.rs b/src/test/compile-fail/issue-2356.rs index 30a9fadaeb08..9a574b984ca4 100644 --- a/src/test/compile-fail/issue-2356.rs +++ b/src/test/compile-fail/issue-2356.rs @@ -14,6 +14,6 @@ struct cat { tail: int, } -impl cat { +pub impl cat { fn meow() { tail += 1; } //~ ERROR: Did you mean: `self.tail` } diff --git a/src/test/compile-fail/issue-2766-a.rs b/src/test/compile-fail/issue-2766-a.rs index 77a840e7e366..8ec63ddc634c 100644 --- a/src/test/compile-fail/issue-2766-a.rs +++ b/src/test/compile-fail/issue-2766-a.rs @@ -14,7 +14,7 @@ pub mod stream { use core::option; use core::pipes; - impl Stream { + pub impl Stream { pub fn recv() -> extern fn(+v: Stream) -> ::stream::Stream { // resolve really should report just one error here. // Change the test case when it changes. diff --git a/src/test/compile-fail/issue-3021-b.rs b/src/test/compile-fail/issue-3021-b.rs index 1d4cd69c54ee..e6d16042445e 100644 --- a/src/test/compile-fail/issue-3021-b.rs +++ b/src/test/compile-fail/issue-3021-b.rs @@ -16,7 +16,7 @@ fn siphash(k0 : u64) { v0: u64, } - impl siphash { + pub impl siphash { fn reset(&mut self) { self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR attempted dynamic environment-capture //~^ ERROR unresolved name: `k0`. diff --git a/src/test/compile-fail/issue-3080.rs b/src/test/compile-fail/issue-3080.rs index d7a214dc76bd..530dadd7e909 100644 --- a/src/test/compile-fail/issue-3080.rs +++ b/src/test/compile-fail/issue-3080.rs @@ -10,7 +10,7 @@ // xfail-test enum x = (); -impl x { +pub impl x { unsafe fn with() { } // This should fail } diff --git a/src/test/compile-fail/issue-3311.rs b/src/test/compile-fail/issue-3311.rs index a09a87d9a6bf..1207ddcb9a04 100644 --- a/src/test/compile-fail/issue-3311.rs +++ b/src/test/compile-fail/issue-3311.rs @@ -14,7 +14,7 @@ struct Foo { u: ~() } -impl Foo { +pub impl Foo { fn get_s(&self) -> &self/str { self.s } diff --git a/src/test/compile-fail/issue-3707.rs b/src/test/compile-fail/issue-3707.rs index c166c400b36d..040bd46ab8c8 100644 --- a/src/test/compile-fail/issue-3707.rs +++ b/src/test/compile-fail/issue-3707.rs @@ -13,7 +13,7 @@ struct Obj { member: uint } -impl Obj { +pub impl Obj { static pure fn boom() -> bool { return 1+1 == 2 } diff --git a/src/test/compile-fail/issue-3763.rs b/src/test/compile-fail/issue-3763.rs index ea4b70c3c290..09a3f3d89c46 100644 --- a/src/test/compile-fail/issue-3763.rs +++ b/src/test/compile-fail/issue-3763.rs @@ -15,7 +15,7 @@ mod my_mod { pub fn MyStruct () -> MyStruct { MyStruct {priv_field: 4} } - impl MyStruct { + pub impl MyStruct { priv fn happyfun() {} } } diff --git a/src/test/compile-fail/mutable-class-fields-2.rs b/src/test/compile-fail/mutable-class-fields-2.rs index 04ba25fc07d6..3a63cdee20c8 100644 --- a/src/test/compile-fail/mutable-class-fields-2.rs +++ b/src/test/compile-fail/mutable-class-fields-2.rs @@ -15,7 +15,7 @@ struct cat { how_hungry : int, } -impl cat { +pub impl cat { fn eat() { self.how_hungry -= 5; } diff --git a/src/test/compile-fail/regions-addr-of-self.rs b/src/test/compile-fail/regions-addr-of-self.rs index c6c89a3ae04a..96657edb5b1a 100644 --- a/src/test/compile-fail/regions-addr-of-self.rs +++ b/src/test/compile-fail/regions-addr-of-self.rs @@ -12,7 +12,7 @@ struct dog { cats_chased: uint, } -impl dog { +pub impl dog { fn chase_cat(&mut self) { let p: &static/mut uint = &mut self.cats_chased; //~ ERROR cannot infer an appropriate lifetime due to conflicting requirements *p += 1u; diff --git a/src/test/compile-fail/regions-addr-of-upvar-self.rs b/src/test/compile-fail/regions-addr-of-upvar-self.rs index 8e98d4341a8b..b9a9e2f38f5a 100644 --- a/src/test/compile-fail/regions-addr-of-upvar-self.rs +++ b/src/test/compile-fail/regions-addr-of-upvar-self.rs @@ -12,7 +12,7 @@ struct dog { food: uint, } -impl dog { +pub impl dog { fn chase_cat(&mut self) { for uint::range(0u, 10u) |_i| { let p: &'static mut uint = &mut self.food; //~ ERROR cannot infer an appropriate lifetime due to conflicting requirements diff --git a/src/test/compile-fail/trait-or-new-type-instead.rs b/src/test/compile-fail/trait-or-new-type-instead.rs index 0634205140b5..dc7c7cec65f3 100644 --- a/src/test/compile-fail/trait-or-new-type-instead.rs +++ b/src/test/compile-fail/trait-or-new-type-instead.rs @@ -9,7 +9,7 @@ // except according to those terms. // error-pattern: implement a trait or new type instead -impl Option { +pub impl Option { fn foo() { } } diff --git a/src/test/compile-fail/use-after-move-self-based-on-type.rs b/src/test/compile-fail/use-after-move-self-based-on-type.rs index a06bc42d29ab..b0a2bc8ec127 100644 --- a/src/test/compile-fail/use-after-move-self-based-on-type.rs +++ b/src/test/compile-fail/use-after-move-self-based-on-type.rs @@ -6,7 +6,7 @@ impl Drop for S { fn finalize(&self) {} } -impl S { +pub impl S { fn foo(self) -> int { self.bar(); return self.x; //~ ERROR use of moved value diff --git a/src/test/compile-fail/use-after-move-self.rs b/src/test/compile-fail/use-after-move-self.rs index 7ad41b518a13..3eded9fd4f39 100644 --- a/src/test/compile-fail/use-after-move-self.rs +++ b/src/test/compile-fail/use-after-move-self.rs @@ -2,7 +2,7 @@ struct S { x: ~int } -impl S { +pub impl S { fn foo(self) -> int { self.bar(); return *self.x; //~ ERROR use of moved value diff --git a/src/test/run-pass/anon-trait-static-method.rs b/src/test/run-pass/anon-trait-static-method.rs index 4143c12cf670..2ec0b59e13fe 100644 --- a/src/test/run-pass/anon-trait-static-method.rs +++ b/src/test/run-pass/anon-trait-static-method.rs @@ -12,7 +12,7 @@ struct Foo { x: int } -impl Foo { +pub impl Foo { static fn new() -> Foo { Foo { x: 3 } } diff --git a/src/test/run-pass/auto-ref-newtype.rs b/src/test/run-pass/auto-ref-newtype.rs index 80f20b13bdda..1b4c22e80f3e 100644 --- a/src/test/run-pass/auto-ref-newtype.rs +++ b/src/test/run-pass/auto-ref-newtype.rs @@ -13,7 +13,7 @@ enum Foo = uint; -impl Foo { +pub impl Foo { fn len(&self) -> uint { **self } } diff --git a/src/test/run-pass/autoderef-and-borrow-method-receiver.rs b/src/test/run-pass/autoderef-and-borrow-method-receiver.rs index 6e6d289e90fb..883cffa792bf 100644 --- a/src/test/run-pass/autoderef-and-borrow-method-receiver.rs +++ b/src/test/run-pass/autoderef-and-borrow-method-receiver.rs @@ -12,7 +12,7 @@ struct Foo { x: int, } -impl Foo { +pub impl Foo { fn f(&const self) {} } diff --git a/src/test/run-pass/borrowck-wg-borrow-mut-to-imm-3.rs b/src/test/run-pass/borrowck-wg-borrow-mut-to-imm-3.rs index 748672ef050f..d8612155f6cd 100644 --- a/src/test/run-pass/borrowck-wg-borrow-mut-to-imm-3.rs +++ b/src/test/run-pass/borrowck-wg-borrow-mut-to-imm-3.rs @@ -2,7 +2,7 @@ struct Wizard { spells: ~[&static/str] } -impl Wizard { +pub impl Wizard { fn cast(&mut self) { for self.spells.each |&spell| { io::println(spell); diff --git a/src/test/run-pass/class-cast-to-trait-multiple-types.rs b/src/test/run-pass/class-cast-to-trait-multiple-types.rs index f35a91c2b914..7c5d5c4d126f 100644 --- a/src/test/run-pass/class-cast-to-trait-multiple-types.rs +++ b/src/test/run-pass/class-cast-to-trait-multiple-types.rs @@ -18,7 +18,7 @@ struct dog { volume : @mut int, } -impl dog { +pub impl dog { priv fn bark() -> int { debug!("Woof %u %d", *self.barks, *self.volume); *self.barks += 1u; @@ -55,7 +55,7 @@ impl noisy for cat { fn speak() -> int { self.meow() as int } } -impl cat { +pub impl cat { fn meow_count() -> uint { *self.meows } } diff --git a/src/test/run-pass/class-cast-to-trait.rs b/src/test/run-pass/class-cast-to-trait.rs index 157ea586c2c4..581361c154c4 100644 --- a/src/test/run-pass/class-cast-to-trait.rs +++ b/src/test/run-pass/class-cast-to-trait.rs @@ -22,7 +22,7 @@ impl noisy for cat { fn speak(&mut self) { self.meow(); } } -impl cat { +pub impl cat { fn eat(&mut self) -> bool { if self.how_hungry > 0 { error!("OM NOM NOM"); diff --git a/src/test/run-pass/class-impl-very-parameterized-trait.rs b/src/test/run-pass/class-impl-very-parameterized-trait.rs index 40f728d40bfe..f71675c06be0 100644 --- a/src/test/run-pass/class-impl-very-parameterized-trait.rs +++ b/src/test/run-pass/class-impl-very-parameterized-trait.rs @@ -34,7 +34,7 @@ struct cat { name : T, } -impl cat { +pub impl cat { fn speak(&mut self) { self.meow(); } fn eat(&mut self) -> bool { @@ -103,7 +103,7 @@ impl Map for cat { } } -impl cat { +pub impl cat { pure fn get(&self, k: &int) -> &self/T { match self.find(k) { Some(v) => { v } diff --git a/src/test/run-pass/class-implement-trait-cross-crate.rs b/src/test/run-pass/class-implement-trait-cross-crate.rs index aa7bb738bf54..aa77dbb62c0a 100644 --- a/src/test/run-pass/class-implement-trait-cross-crate.rs +++ b/src/test/run-pass/class-implement-trait-cross-crate.rs @@ -20,7 +20,7 @@ struct cat { name : ~str, } -impl cat { +pub impl cat { fn eat(&mut self) -> bool { if self.how_hungry > 0 { error!("OM NOM NOM"); diff --git a/src/test/run-pass/class-implement-traits.rs b/src/test/run-pass/class-implement-traits.rs index bdc8f7568a16..896b139110f2 100644 --- a/src/test/run-pass/class-implement-traits.rs +++ b/src/test/run-pass/class-implement-traits.rs @@ -32,7 +32,7 @@ priv impl cat { } } -impl cat { +pub impl cat { fn eat(&mut self) -> bool { if self.how_hungry > 0 { error!("OM NOM NOM"); diff --git a/src/test/run-pass/class-methods.rs b/src/test/run-pass/class-methods.rs index 1e41b60a8223..f65bcf7be8e6 100644 --- a/src/test/run-pass/class-methods.rs +++ b/src/test/run-pass/class-methods.rs @@ -14,7 +14,7 @@ struct cat { how_hungry : int, } -impl cat { +pub impl cat { fn speak(&mut self) { self.meows += 1u; } fn meow_count(&mut self) -> uint { self.meows } } diff --git a/src/test/run-pass/class-poly-methods.rs b/src/test/run-pass/class-poly-methods.rs index e81d07a783b9..654260d83999 100644 --- a/src/test/run-pass/class-poly-methods.rs +++ b/src/test/run-pass/class-poly-methods.rs @@ -15,7 +15,7 @@ struct cat { how_hungry : int, } -impl cat { +pub impl cat { fn speak(&mut self, stuff: ~[T]) { self.meows += stuff.len(); } diff --git a/src/test/run-pass/class-separate-impl.rs b/src/test/run-pass/class-separate-impl.rs index 9c7d9ce7415a..728deff8e2db 100644 --- a/src/test/run-pass/class-separate-impl.rs +++ b/src/test/run-pass/class-separate-impl.rs @@ -18,7 +18,7 @@ struct cat { name : ~str, } -impl cat { +pub impl cat { fn speak(&mut self) { self.meow(); } fn eat(&mut self) -> bool { diff --git a/src/test/run-pass/class-typarams.rs b/src/test/run-pass/class-typarams.rs index cbc69719caa6..29354c54d8ba 100644 --- a/src/test/run-pass/class-typarams.rs +++ b/src/test/run-pass/class-typarams.rs @@ -14,7 +14,7 @@ struct cat { how_hungry : int, } -impl cat { +pub impl cat { fn speak(&mut self) { self.meows += 1u; } fn meow_count(&mut self) -> uint { self.meows } } diff --git a/src/test/run-pass/classes-simple-method.rs b/src/test/run-pass/classes-simple-method.rs index ac80ca9b9e93..505537af7a1b 100644 --- a/src/test/run-pass/classes-simple-method.rs +++ b/src/test/run-pass/classes-simple-method.rs @@ -14,7 +14,7 @@ struct cat { how_hungry : int, } -impl cat { +pub impl cat { fn speak(&mut self) {} } diff --git a/src/test/run-pass/classes.rs b/src/test/run-pass/classes.rs index 552715dccb44..0d8d7fc37a91 100644 --- a/src/test/run-pass/classes.rs +++ b/src/test/run-pass/classes.rs @@ -15,7 +15,7 @@ struct cat { name : ~str, } -impl cat { +pub impl cat { fn speak(&mut self) { self.meow(); } fn eat(&mut self) -> bool { diff --git a/src/test/run-pass/coerce-reborrow-imm-ptr-rcvr.rs b/src/test/run-pass/coerce-reborrow-imm-ptr-rcvr.rs index 268e540c10e3..35f963d8fb99 100644 --- a/src/test/run-pass/coerce-reborrow-imm-ptr-rcvr.rs +++ b/src/test/run-pass/coerce-reborrow-imm-ptr-rcvr.rs @@ -2,7 +2,7 @@ struct SpeechMaker { speeches: uint } -impl SpeechMaker { +pub impl SpeechMaker { pure fn how_many(&self) -> uint { self.speeches } } diff --git a/src/test/run-pass/coerce-reborrow-mut-ptr-rcvr.rs b/src/test/run-pass/coerce-reborrow-mut-ptr-rcvr.rs index a2ba4ddb827b..fd47c262d6a7 100644 --- a/src/test/run-pass/coerce-reborrow-mut-ptr-rcvr.rs +++ b/src/test/run-pass/coerce-reborrow-mut-ptr-rcvr.rs @@ -2,7 +2,7 @@ struct SpeechMaker { speeches: uint } -impl SpeechMaker { +pub impl SpeechMaker { fn talk(&mut self) { self.speeches += 1; } diff --git a/src/test/run-pass/const-enum-byref-self.rs b/src/test/run-pass/const-enum-byref-self.rs index 19311cb17325..57cfdd2f9d47 100644 --- a/src/test/run-pass/const-enum-byref-self.rs +++ b/src/test/run-pass/const-enum-byref-self.rs @@ -11,7 +11,7 @@ enum E { V, VV(int) } const C: E = V; -impl E { +pub impl E { fn method(&self) { match *self { V => {} diff --git a/src/test/run-pass/explicit-self-closures.rs b/src/test/run-pass/explicit-self-closures.rs index d40b2f72ae8b..e019140d1a01 100644 --- a/src/test/run-pass/explicit-self-closures.rs +++ b/src/test/run-pass/explicit-self-closures.rs @@ -14,7 +14,7 @@ struct Box { x: uint } -impl Box { +pub impl Box { fn set_many(&mut self, xs: &[uint]) { for xs.each |x| { self.x = *x; } } diff --git a/src/test/run-pass/explicit-self-generic.rs b/src/test/run-pass/explicit-self-generic.rs index d03893367b4c..5df155e4ad3f 100644 --- a/src/test/run-pass/explicit-self-generic.rs +++ b/src/test/run-pass/explicit-self-generic.rs @@ -30,7 +30,7 @@ fn linear_map() -> LinearMap { size: 0}) } -impl LinearMap { +pub impl LinearMap { fn len(&mut self) -> uint { self.size } diff --git a/src/test/run-pass/explicit-self.rs b/src/test/run-pass/explicit-self.rs index 26e2023e89c5..885eb9837a71 100644 --- a/src/test/run-pass/explicit-self.rs +++ b/src/test/run-pass/explicit-self.rs @@ -26,7 +26,7 @@ fn compute_area(shape: &shape) -> float { } } -impl shape { +pub impl shape { // self is in the implicit self region fn select(&self, threshold: float, a: &r/T, b: &r/T) -> &r/T { @@ -54,7 +54,7 @@ fn thing(x: A) -> thing { } } -impl thing { +pub impl thing { fn foo(@self) -> int { *self.x.a } fn bar(~self) -> int { *self.x.a } fn quux(&self) -> int { *self.x.a } diff --git a/src/test/run-pass/impl-implicit-trait.rs b/src/test/run-pass/impl-implicit-trait.rs index 511529bbc8f7..88e220670ba2 100644 --- a/src/test/run-pass/impl-implicit-trait.rs +++ b/src/test/run-pass/impl-implicit-trait.rs @@ -13,7 +13,7 @@ enum option_ { some_(T), } -impl option_ { +pub impl option_ { fn foo() -> bool { true } } @@ -22,7 +22,7 @@ enum option__ { some__(int) } -impl option__ { +pub impl option__ { fn foo() -> bool { true } } diff --git a/src/test/run-pass/issue-2311-2.rs b/src/test/run-pass/issue-2311-2.rs index b4141b47b4d6..f60db84eb865 100644 --- a/src/test/run-pass/issue-2311-2.rs +++ b/src/test/run-pass/issue-2311-2.rs @@ -13,7 +13,7 @@ struct foo { x: A, } -impl foo { +pub impl foo { fn bar>(c: C) -> B { fail!(); } diff --git a/src/test/run-pass/issue-2312.rs b/src/test/run-pass/issue-2312.rs index 12e9157ba247..9e45a6b53c2b 100644 --- a/src/test/run-pass/issue-2312.rs +++ b/src/test/run-pass/issue-2312.rs @@ -14,7 +14,7 @@ trait clam { } enum foo = int; -impl foo { +pub impl foo { fn bar>(c: C) -> B { fail!(); } } diff --git a/src/test/run-pass/issue-2445-b.rs b/src/test/run-pass/issue-2445-b.rs index 9869b8d330bf..73bf97ad7af8 100644 --- a/src/test/run-pass/issue-2445-b.rs +++ b/src/test/run-pass/issue-2445-b.rs @@ -12,7 +12,7 @@ struct c1 { x: T, } -impl c1 { +pub impl c1 { fn f1(x: int) { } } @@ -23,7 +23,7 @@ fn c1(x: T) -> c1 { } } -impl c1 { +pub impl c1 { fn f2(x: int) { } } diff --git a/src/test/run-pass/issue-2445.rs b/src/test/run-pass/issue-2445.rs index 4a085a1eb8a9..973b8d851611 100644 --- a/src/test/run-pass/issue-2445.rs +++ b/src/test/run-pass/issue-2445.rs @@ -12,7 +12,7 @@ struct c1 { x: T, } -impl c1 { +pub impl c1 { fn f1(x: T) {} } @@ -22,7 +22,7 @@ fn c1(x: T) -> c1 { } } -impl c1 { +pub impl c1 { fn f2(x: T) {} } diff --git a/src/test/run-pass/issue-2487-a.rs b/src/test/run-pass/issue-2487-a.rs index 198a8c900d77..33023db5323f 100644 --- a/src/test/run-pass/issue-2487-a.rs +++ b/src/test/run-pass/issue-2487-a.rs @@ -17,7 +17,7 @@ impl Drop for socket { fn finalize(&self) {} } -impl socket { +pub impl socket { fn set_identity() { do closure { diff --git a/src/test/run-pass/issue-2502.rs b/src/test/run-pass/issue-2502.rs index 7696ec372172..57e5aa39864c 100644 --- a/src/test/run-pass/issue-2502.rs +++ b/src/test/run-pass/issue-2502.rs @@ -12,7 +12,7 @@ struct font { fontbuf: &self/~[u8], } -impl font { +pub impl font { fn buf() -> &self/~[u8] { self.fontbuf } diff --git a/src/test/run-pass/issue-3220.rs b/src/test/run-pass/issue-3220.rs index ef65531e5546..9ecc46c17ac3 100644 --- a/src/test/run-pass/issue-3220.rs +++ b/src/test/run-pass/issue-3220.rs @@ -19,7 +19,7 @@ fn thing() -> thing { x: 0 } } -impl thing { fn f(self) {} } +pub impl thing { fn f(self) {} } pub fn main() { let z = thing(); diff --git a/src/test/run-pass/issue-3447.rs b/src/test/run-pass/issue-3447.rs index 0d1b0b9d0029..2f7cb998e1ae 100644 --- a/src/test/run-pass/issue-3447.rs +++ b/src/test/run-pass/issue-3447.rs @@ -13,7 +13,7 @@ struct list { next: Option<@mut list> } -impl list{ +pub impl list{ fn addEnd(&mut self, element: &self/T) { let newList = list { element: element, diff --git a/src/test/run-pass/issue-3860.rs b/src/test/run-pass/issue-3860.rs index fdc50220014f..b113e902963b 100644 --- a/src/test/run-pass/issue-3860.rs +++ b/src/test/run-pass/issue-3860.rs @@ -10,7 +10,7 @@ struct Foo { x: int } -impl Foo { +pub impl Foo { fn stuff(&mut self) -> &self/mut Foo { return self; } diff --git a/src/test/run-pass/issue-3904.rs b/src/test/run-pass/issue-3904.rs index 8f2b13b6eb02..1a09a8b860f8 100644 --- a/src/test/run-pass/issue-3904.rs +++ b/src/test/run-pass/issue-3904.rs @@ -23,7 +23,7 @@ struct X { err: ErrPrinter } -impl X { +pub impl X { fn boom() { exit(self.err, "prog", "arg"); } diff --git a/src/test/run-pass/max-min-classes.rs b/src/test/run-pass/max-min-classes.rs index 762b89f5101c..56c16d928741 100644 --- a/src/test/run-pass/max-min-classes.rs +++ b/src/test/run-pass/max-min-classes.rs @@ -17,7 +17,7 @@ struct Foo { y: int, } -impl Foo { +pub impl Foo { fn sum() -> int { self.x + self.y } diff --git a/src/test/run-pass/move-self.rs b/src/test/run-pass/move-self.rs index 37ce1bce9e65..d84646957283 100644 --- a/src/test/run-pass/move-self.rs +++ b/src/test/run-pass/move-self.rs @@ -2,7 +2,7 @@ struct S { x: ~str } -impl S { +pub impl S { fn foo(self) { self.bar(); } diff --git a/src/test/run-pass/nested-class.rs b/src/test/run-pass/nested-class.rs index 149e346bb477..2f2930dbab7c 100644 --- a/src/test/run-pass/nested-class.rs +++ b/src/test/run-pass/nested-class.rs @@ -14,7 +14,7 @@ pub fn main() { i: int, } - impl b { + pub impl b { fn do_stuff() -> int { return 37; } } diff --git a/src/test/run-pass/operator-overloading-explicit-self.rs b/src/test/run-pass/operator-overloading-explicit-self.rs index 5a3ed4c60827..b56f7fa961e2 100644 --- a/src/test/run-pass/operator-overloading-explicit-self.rs +++ b/src/test/run-pass/operator-overloading-explicit-self.rs @@ -12,7 +12,7 @@ struct S { x: int } -impl S { +pub impl S { pure fn add(&self, other: &S) -> S { S { x: self.x + other.x } } diff --git a/src/test/run-pass/private-class-field.rs b/src/test/run-pass/private-class-field.rs index 9cb86ffe8370..0abb758bd7e8 100644 --- a/src/test/run-pass/private-class-field.rs +++ b/src/test/run-pass/private-class-field.rs @@ -14,7 +14,7 @@ struct cat { how_hungry : int, } -impl cat { +pub impl cat { fn meow_count(&mut self) -> uint { self.meows } } diff --git a/src/test/run-pass/private-method.rs b/src/test/run-pass/private-method.rs index 432c189ae423..1fab77cb5c86 100644 --- a/src/test/run-pass/private-method.rs +++ b/src/test/run-pass/private-method.rs @@ -14,7 +14,7 @@ struct cat { how_hungry : int, } -impl cat { +pub impl cat { fn play(&mut self) { self.meows += 1u; self.nap(); diff --git a/src/test/run-pass/reflect-visit-data.rs b/src/test/run-pass/reflect-visit-data.rs index 27afde631b2a..98e42bd7b4df 100644 --- a/src/test/run-pass/reflect-visit-data.rs +++ b/src/test/run-pass/reflect-visit-data.rs @@ -30,7 +30,7 @@ fn align(size: uint, align: uint) -> uint { enum ptr_visit_adaptor = Inner; -impl ptr_visit_adaptor { +pub impl ptr_visit_adaptor { #[inline(always)] fn bump(sz: uint) { @@ -478,7 +478,7 @@ struct Stuff { vals: ~[~str] } -impl my_visitor { +pub impl my_visitor { fn get(f: fn(T)) { unsafe { f(*(self.ptr1 as *T)); diff --git a/src/test/run-pass/resource-destruct.rs b/src/test/run-pass/resource-destruct.rs index 3dc4ca7bd61d..2b00aea2b4ce 100644 --- a/src/test/run-pass/resource-destruct.rs +++ b/src/test/run-pass/resource-destruct.rs @@ -18,7 +18,7 @@ impl Drop for shrinky_pointer { } } -impl shrinky_pointer { +pub impl shrinky_pointer { fn look_at() -> int { return **(self.i); } }