diff --git a/src/test/auxiliary/cci_capture_clause.rs b/src/test/auxiliary/cci_capture_clause.rs index a558de33876..c22047287e6 100644 --- a/src/test/auxiliary/cci_capture_clause.rs +++ b/src/test/auxiliary/cci_capture_clause.rs @@ -8,13 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[legacy_exports]; - -export foo; - use core::oldcomm::*; -fn foo(x: T) -> Port { +pub fn foo(x: T) -> Port { let p = Port(); let c = Chan(&p); do task::spawn() |copy c, copy x| { diff --git a/src/test/auxiliary/cci_class_cast.rs b/src/test/auxiliary/cci_class_cast.rs index 032a01178f3..61bbd433f7b 100644 --- a/src/test/auxiliary/cci_class_cast.rs +++ b/src/test/auxiliary/cci_class_cast.rs @@ -14,15 +14,13 @@ use to_str::*; use to_str::ToStr; mod kitty { - #[legacy_exports]; + pub struct cat { + priv mut meows : uint, + mut how_hungry : int, + name : ~str, + } -struct cat { - priv mut meows : uint, - mut how_hungry : int, - name : ~str, -} - - impl cat : ToStr { + pub impl cat : ToStr { pure fn to_str() -> ~str { copy self.name } } @@ -37,7 +35,7 @@ struct cat { } - impl cat { + pub impl cat { fn speak() { self.meow(); } fn eat() -> bool { @@ -52,14 +50,14 @@ struct cat { } } } -fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat { - cat { - meows: in_x, - how_hungry: in_y, - name: in_name + + pub fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat { + cat { + meows: in_x, + how_hungry: in_y, + name: in_name + } } } -} - diff --git a/src/test/auxiliary/issue-2631-a.rs b/src/test/auxiliary/issue-2631-a.rs index 71425659584..197ad840234 100644 --- a/src/test/auxiliary/issue-2631-a.rs +++ b/src/test/auxiliary/issue-2631-a.rs @@ -10,17 +10,15 @@ #[link(name = "req")]; #[crate_type = "lib"]; -#[legacy_exports]; extern mod std; -use dvec::*; -use dvec::DVec; +use core::dvec::*; use std::map::HashMap; -type header_map = HashMap<~str, @DVec<@~str>>; +pub type header_map = HashMap<~str, @DVec<@~str>>; // the unused ty param is necessary so this gets monomorphized -fn request(req: header_map) { +pub fn request(req: header_map) { let _x = copy *(copy *req.get(~"METHOD"))[0u]; } diff --git a/src/test/auxiliary/static-methods-crate.rs b/src/test/auxiliary/static-methods-crate.rs index 0ae0423e6be..530309536d9 100644 --- a/src/test/auxiliary/static-methods-crate.rs +++ b/src/test/auxiliary/static-methods-crate.rs @@ -12,10 +12,8 @@ vers = "0.1")]; #[crate_type = "lib"]; -#[legacy_exports]; -export read, readMaybe; -trait read { +pub trait read { static fn readMaybe(s: ~str) -> Option; } @@ -35,7 +33,7 @@ impl bool: read { } } -fn read(s: ~str) -> T { +pub fn read(s: ~str) -> T { match read::readMaybe(s) { Some(x) => x, _ => fail ~"read failed!" diff --git a/src/test/auxiliary/static_fn_inline_xc_aux.rs b/src/test/auxiliary/static_fn_inline_xc_aux.rs index c85ff320bc8..2a1cce54783 100644 --- a/src/test/auxiliary/static_fn_inline_xc_aux.rs +++ b/src/test/auxiliary/static_fn_inline_xc_aux.rs @@ -16,7 +16,7 @@ pub mod num { } pub mod float { - impl float: num::Num2 { + impl float: ::num::Num2 { #[inline] static pure fn from_int2(n: int) -> float { return n as float; } } diff --git a/src/test/auxiliary/static_fn_trait_xc_aux.rs b/src/test/auxiliary/static_fn_trait_xc_aux.rs index e67d46553cf..40659da8dae 100644 --- a/src/test/auxiliary/static_fn_trait_xc_aux.rs +++ b/src/test/auxiliary/static_fn_trait_xc_aux.rs @@ -5,7 +5,7 @@ pub mod num { } pub mod float { - impl float: num::Num2 { + impl float: ::num::Num2 { static pure fn from_int2(n: int) -> float { return n as float; } } -} \ No newline at end of file +} diff --git a/src/test/auxiliary/test_comm.rs b/src/test/auxiliary/test_comm.rs index 0ae2dc5340e..72000f2f0a9 100644 --- a/src/test/auxiliary/test_comm.rs +++ b/src/test/auxiliary/test_comm.rs @@ -13,12 +13,8 @@ Could probably be more minimal. */ -#[legacy_exports]; -use libc::size_t; - -export port; -export recv; +use core::libc::size_t; /** @@ -28,12 +24,12 @@ export recv; * transmitted. If a port value is copied, both copies refer to the same * port. Ports may be associated with multiple `chan`s. */ -enum port { +pub enum port { port_t(@port_ptr) } /// Constructs a port -fn port() -> port { +pub fn port() -> port { port_t(@port_ptr(rustrt::new_port(sys::size_of::() as size_t))) } @@ -74,11 +70,11 @@ fn port_ptr(po: *rust_port) -> port_ptr { * Receive from a port. If no data is available on the port then the * task will block until data becomes available. */ -fn recv(p: port) -> T { recv_((**p).po) } +pub fn recv(p: port) -> T { recv_((**p).po) } /// Receive on a raw port pointer -fn recv_(p: *rust_port) -> T { +pub fn recv_(p: *rust_port) -> T { let yield = 0; let yieldp = ptr::addr_of(&yield); let mut res; diff --git a/src/test/run-pass/auto-encode.rs b/src/test/run-pass/auto-encode.rs index 555171f9d5f..2bd00ddc4ef 100644 --- a/src/test/run-pass/auto-encode.rs +++ b/src/test/run-pass/auto-encode.rs @@ -26,12 +26,12 @@ use std::serialize::{Encodable, Decodable}; use std::prettyprint; use std::time; -fn test_prettyprint>( +fn test_prettyprint>( a: &A, expected: &~str ) { let s = do io::with_str_writer |w| { - a.encode(&prettyprint::Encoder(w)) + a.encode(&prettyprint::Serializer(w)) }; debug!("s == %?", s); assert s == *expected; diff --git a/src/test/run-pass/cci_capture_clause.rs b/src/test/run-pass/cci_capture_clause.rs index be64fcd8992..a439d2af8fc 100644 --- a/src/test/run-pass/cci_capture_clause.rs +++ b/src/test/run-pass/cci_capture_clause.rs @@ -18,7 +18,7 @@ extern mod cci_capture_clause; -use oldcomm::recv; +use core::oldcomm::recv; fn main() { cci_capture_clause::foo(()).recv() diff --git a/src/test/run-pass/class-separate-impl.rs b/src/test/run-pass/class-separate-impl.rs index 23c1e6792a4..eb3728f2c6f 100644 --- a/src/test/run-pass/class-separate-impl.rs +++ b/src/test/run-pass/class-separate-impl.rs @@ -9,8 +9,7 @@ // except according to those terms. // xfail-fast -use to_str::*; -use to_str::ToStr; +use core::to_str::*; struct cat { priv mut meows : uint, diff --git a/src/test/run-pass/export-non-interference3.rs b/src/test/run-pass/export-non-interference3.rs index 85d1a33826c..bdde94f5ef0 100644 --- a/src/test/run-pass/export-non-interference3.rs +++ b/src/test/run-pass/export-non-interference3.rs @@ -9,17 +9,11 @@ // except according to those terms. mod foo { - #[legacy_exports]; - export x; - - fn x() { bar::x(); } + pub fn x() { bar::x(); } } mod bar { - #[legacy_exports]; - export x; - - fn x() { debug!("x"); } + pub fn x() { debug!("x"); } } fn main() { foo::x(); } diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs index c8fbb0dd741..577ac67dd6a 100644 --- a/src/test/run-pass/hashmap-memory.rs +++ b/src/test/run-pass/hashmap-memory.rs @@ -28,14 +28,12 @@ use oldcomm::recv; fn map(filename: ~str, emit: map_reduce::putter) { emit(filename, ~"1"); } mod map_reduce { - #[legacy_exports]; - export putter; - export mapper; - export map_reduce; + use std::map; + use std::map::HashMap; - type putter = fn@(~str, ~str); + pub type putter = fn@(~str, ~str); - type mapper = extern fn(~str, putter); + pub type mapper = extern fn(~str, putter); enum ctrl_proto { find_reducer(~[u8], Chan), mapper_done, } @@ -70,7 +68,7 @@ mod map_reduce { send(ctrl, mapper_done); } - fn map_reduce(inputs: ~[~str]) { + pub fn map_reduce(inputs: ~[~str]) { let ctrl = Port(); // This task becomes the master control task. It spawns others diff --git a/src/test/run-pass/import-glob-crate.rs b/src/test/run-pass/import-glob-crate.rs index 0d3d08b3a39..eba69134c4f 100644 --- a/src/test/run-pass/import-glob-crate.rs +++ b/src/test/run-pass/import-glob-crate.rs @@ -12,7 +12,7 @@ extern mod std; -use vec::*; +use core::vec::*; fn main() { let mut v = from_elem(0u, 0); diff --git a/src/test/run-pass/intrinsic-alignment.rs b/src/test/run-pass/intrinsic-alignment.rs index 6239df98278..01da68ec342 100644 --- a/src/test/run-pass/intrinsic-alignment.rs +++ b/src/test/run-pass/intrinsic-alignment.rs @@ -21,26 +21,24 @@ extern mod rusti { #[cfg(target_os = "macos")] #[cfg(target_os = "freebsd")] mod m { - #[legacy_exports]; #[cfg(target_arch = "x86")] - fn main() { - assert rusti::pref_align_of::() == 8u; - assert rusti::min_align_of::() == 4u; + pub fn main() { + assert ::rusti::pref_align_of::() == 8u; + assert ::rusti::min_align_of::() == 4u; } #[cfg(target_arch = "x86_64")] - fn main() { - assert rusti::pref_align_of::() == 8u; - assert rusti::min_align_of::() == 8u; + pub fn main() { + assert ::rusti::pref_align_of::() == 8u; + assert ::rusti::min_align_of::() == 8u; } } #[cfg(target_os = "win32")] mod m { - #[legacy_exports]; #[cfg(target_arch = "x86")] - fn main() { - assert rusti::pref_align_of::() == 8u; - assert rusti::min_align_of::() == 8u; + pub fn main() { + assert ::rusti::pref_align_of::() == 8u; + assert ::rusti::min_align_of::() == 8u; } } diff --git a/src/test/run-pass/issue-2214.rs b/src/test/run-pass/issue-2214.rs index 05c2595931e..efa6d05f9da 100644 --- a/src/test/run-pass/issue-2214.rs +++ b/src/test/run-pass/issue-2214.rs @@ -10,8 +10,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use libc::{c_double, c_int}; -use f64::*; +use core::cast; +use core::libc::{c_double, c_int}; +use core::f64::*; fn to_c_int(v: &mut int) -> &mut c_int unsafe { cast::reinterpret_cast(&v) @@ -24,13 +25,12 @@ fn lgamma(n: c_double, value: &mut int) -> c_double { #[link_name = "m"] #[abi = "cdecl"] extern mod m { - #[legacy_exports]; #[cfg(unix)] - #[link_name="lgamma_r"] fn lgamma(n: c_double, sign: &mut c_int) + #[link_name="lgamma_r"] pub fn lgamma(n: c_double, sign: &mut c_int) -> c_double; #[cfg(windows)] - #[link_name="__lgamma_r"] fn lgamma(n: c_double, - sign: &mut c_int) -> c_double; + #[link_name="__lgamma_r"] pub fn lgamma(n: c_double, + sign: &mut c_int) -> c_double; } diff --git a/src/test/run-pass/issue-2718.rs b/src/test/run-pass/issue-2718.rs index 632fe348d8d..71afce93421 100644 --- a/src/test/run-pass/issue-2718.rs +++ b/src/test/run-pass/issue-2718.rs @@ -11,31 +11,30 @@ // except according to those terms. // tjc: I don't know why -mod pipes { - #[legacy_exports]; - use cast::{forget, transmute}; +pub mod pipes { + use core::cast::{forget, transmute}; - enum state { + pub enum state { empty, full, blocked, terminated } - impl state : cmp::Eq { + pub impl state : cmp::Eq { pure fn eq(&self, other: &state) -> bool { ((*self) as uint) == ((*other) as uint) } pure fn ne(&self, other: &state) -> bool { !(*self).eq(other) } } - type packet = { + pub type packet = { mut state: state, mut blocked_task: Option, mut payload: Option }; - fn packet() -> *packet unsafe { + pub fn packet() -> *packet unsafe { let p: *packet = cast::transmute(~{ mut state: empty, mut blocked_task: None::, @@ -46,31 +45,30 @@ mod pipes { #[abi = "rust-intrinsic"] mod rusti { - #[legacy_exports]; - fn atomic_xchg(_dst: &mut int, _src: int) -> int { fail; } - fn atomic_xchg_acq(_dst: &mut int, _src: int) -> int { fail; } - fn atomic_xchg_rel(_dst: &mut int, _src: int) -> int { fail; } + pub fn atomic_xchg(_dst: &mut int, _src: int) -> int { fail; } + pub fn atomic_xchg_acq(_dst: &mut int, _src: int) -> int { fail; } + pub fn atomic_xchg_rel(_dst: &mut int, _src: int) -> int { fail; } } // We should consider moving this to core::unsafe, although I // suspect graydon would want us to use void pointers instead. - unsafe fn uniquify(+x: *T) -> ~T { + pub unsafe fn uniquify(+x: *T) -> ~T { unsafe { cast::transmute(move x) } } - fn swap_state_acq(+dst: &mut state, src: state) -> state { + pub fn swap_state_acq(+dst: &mut state, src: state) -> state { unsafe { transmute(rusti::atomic_xchg_acq(transmute(move dst), src as int)) } } - fn swap_state_rel(+dst: &mut state, src: state) -> state { + pub fn swap_state_rel(+dst: &mut state, src: state) -> state { unsafe { transmute(rusti::atomic_xchg_rel(transmute(move dst), src as int)) } } - fn send(-p: send_packet, -payload: T) { + pub fn send(-p: send_packet, -payload: T) { let p = p.unwrap(); let p = unsafe { uniquify(p) }; assert (*p).payload.is_none(); @@ -96,7 +94,7 @@ mod pipes { } } - fn recv(-p: recv_packet) -> Option { + pub fn recv(-p: recv_packet) -> Option { let p = p.unwrap(); let p = unsafe { uniquify(p) }; loop { @@ -117,7 +115,7 @@ mod pipes { } } - fn sender_terminate(p: *packet) { + pub fn sender_terminate(p: *packet) { let p = unsafe { uniquify(p) }; match swap_state_rel(&mut (*p).state, terminated) { empty | blocked => { @@ -134,7 +132,7 @@ mod pipes { } } - fn receiver_terminate(p: *packet) { + pub fn receiver_terminate(p: *packet) { let p = unsafe { uniquify(p) }; match swap_state_rel(&mut (*p).state, terminated) { empty => { @@ -151,11 +149,11 @@ mod pipes { } } - struct send_packet { + pub struct send_packet { mut p: Option<*packet>, } - impl send_packet : Drop { + pub impl send_packet : Drop { fn finalize(&self) { if self.p != None { let mut p = None; @@ -165,7 +163,7 @@ mod pipes { } } - impl send_packet { + pub impl send_packet { fn unwrap() -> *packet { let mut p = None; p <-> self.p; @@ -173,17 +171,17 @@ mod pipes { } } - fn send_packet(p: *packet) -> send_packet { + pub fn send_packet(p: *packet) -> send_packet { send_packet { p: Some(p) } } - struct recv_packet { + pub struct recv_packet { mut p: Option<*packet>, } - impl recv_packet : Drop { + pub impl recv_packet : Drop { fn finalize(&self) { if self.p != None { let mut p = None; @@ -193,7 +191,7 @@ mod pipes { } } - impl recv_packet { + pub impl recv_packet { fn unwrap() -> *packet { let mut p = None; p <-> self.p; @@ -201,25 +199,27 @@ mod pipes { } } - fn recv_packet(p: *packet) -> recv_packet { + pub fn recv_packet(p: *packet) -> recv_packet { recv_packet { p: Some(p) } } - fn entangle() -> (send_packet, recv_packet) { + pub fn entangle() -> (send_packet, recv_packet) { let p = packet(); (send_packet(p), recv_packet(p)) } } -mod pingpong { - #[legacy_exports]; - enum ping = pipes::send_packet; - enum pong = pipes::send_packet; +pub mod pingpong { + use core::cast; + use core::ptr; - fn liberate_ping(-p: ping) -> pipes::send_packet unsafe { - let addr : *pipes::send_packet = match &p { + pub enum ping = ::pipes::send_packet; + pub enum pong = ::pipes::send_packet; + + pub fn liberate_ping(-p: ping) -> ::pipes::send_packet unsafe { + let addr : *::pipes::send_packet = match &p { &ping(ref x) => { cast::transmute(ptr::addr_of(x)) } }; let liberated_value = move *addr; @@ -227,8 +227,8 @@ mod pingpong { move liberated_value } - fn liberate_pong(-p: pong) -> pipes::send_packet unsafe { - let addr : *pipes::send_packet = match &p { + pub fn liberate_pong(-p: pong) -> ::pipes::send_packet unsafe { + let addr : *::pipes::send_packet = match &p { &pong(ref x) => { cast::transmute(ptr::addr_of(x)) } }; let liberated_value = move *addr; @@ -236,24 +236,26 @@ mod pingpong { move liberated_value } - fn init() -> (client::ping, server::ping) { - pipes::entangle() + pub fn init() -> (client::ping, server::ping) { + ::pipes::entangle() } - mod client { - #[legacy_exports]; - type ping = pipes::send_packet; - type pong = pipes::recv_packet; + pub mod client { + use core::option; + use pingpong; - fn do_ping(-c: ping) -> pong { - let (sp, rp) = pipes::entangle(); + pub type ping = ::pipes::send_packet; + pub type pong = ::pipes::recv_packet; - pipes::send(move c, ping(move sp)); + pub fn do_ping(-c: ping) -> pong { + let (sp, rp) = ::pipes::entangle(); + + ::pipes::send(move c, ping(move sp)); move rp } - fn do_pong(-c: pong) -> (ping, ()) { - let packet = pipes::recv(move c); + pub fn do_pong(-c: pong) -> (ping, ()) { + let packet = ::pipes::recv(move c); if packet.is_none() { fail ~"sender closed the connection" } @@ -261,22 +263,23 @@ mod pingpong { } } - mod server { - #[legacy_exports]; - type ping = pipes::recv_packet; - type pong = pipes::send_packet; + pub mod server { + use pingpong; - fn do_ping(-c: ping) -> (pong, ()) { - let packet = pipes::recv(move c); + pub type ping = ::pipes::recv_packet; + pub type pong = ::pipes::send_packet; + + pub fn do_ping(-c: ping) -> (pong, ()) { + let packet = ::pipes::recv(move c); if packet.is_none() { fail ~"sender closed the connection" } (liberate_ping(option::unwrap(move packet)), ()) } - fn do_pong(-c: pong) -> ping { - let (sp, rp) = pipes::entangle(); - pipes::send(move c, pong(move sp)); + pub fn do_pong(-c: pong) -> ping { + let (sp, rp) = ::pipes::entangle(); + ::pipes::send(move c, pong(move sp)); move rp } } diff --git a/src/test/run-pass/issue-3559 b/src/test/run-pass/issue-3559 index 406e055884a..505b9b65512 100755 Binary files a/src/test/run-pass/issue-3559 and b/src/test/run-pass/issue-3559 differ diff --git a/src/test/run-pass/issue-3559.rs b/src/test/run-pass/issue-3559.rs index ee68a546caf..da7746681f2 100644 --- a/src/test/run-pass/issue-3559.rs +++ b/src/test/run-pass/issue-3559.rs @@ -12,7 +12,8 @@ // rustc --test map_to_str.rs && ./map_to_str extern mod std; -use io::{WriterUtil}; + +use core::io::{WriterUtil}; use std::map::*; #[cfg(test)] diff --git a/src/test/run-pass/issue-3656.rs b/src/test/run-pass/issue-3656.rs index bd79e287098..66c2a4672b4 100644 --- a/src/test/run-pass/issue-3656.rs +++ b/src/test/run-pass/issue-3656.rs @@ -13,7 +13,7 @@ // Incorrect struct size computation in the FFI, because of not taking // the alignment of elements into account. -use libc::*; +use core::libc::*; struct KEYGEN { hash_algorithm: [c_uint * 2], diff --git a/src/test/run-pass/pipe-pingpong-bounded.rs b/src/test/run-pass/pipe-pingpong-bounded.rs index 8589bbb8e25..c71b8f46f3e 100644 --- a/src/test/run-pass/pipe-pingpong-bounded.rs +++ b/src/test/run-pass/pipe-pingpong-bounded.rs @@ -18,8 +18,7 @@ // This was generated initially by the pipe compiler, but it's been // modified in hopefully straightforward ways. mod pingpong { - #[legacy_exports]; - use pipes::*; + use core::pipes::*; type packets = { // This is probably a resolve bug, I forgot to export packet, @@ -42,11 +41,10 @@ mod pingpong { ptr::addr_of(&(data.ping)) } } - enum ping = server::pong; - enum pong = client::ping; - mod client { - #[legacy_exports]; - fn ping(+pipe: ping) -> pong { + pub enum ping = server::pong; + pub enum pong = client::ping; + pub mod client { + pub fn ping(+pipe: ping) -> pong { { let b = pipe.reuse_buffer(); let s = SendPacketBuffered(ptr::addr_of(&(b.buffer.data.pong))); @@ -56,16 +54,15 @@ mod pingpong { move c } } - type ping = pipes::SendPacketBuffered; - type pong = pipes::RecvPacketBuffered; } - mod server { - #[legacy_exports]; - type ping = pipes::RecvPacketBuffered; - fn pong(+pipe: pong) -> ping { + pub fn pong(+pipe: pong) -> ping { { let b = pipe.reuse_buffer(); let s = SendPacketBuffered(ptr::addr_of(&(b.buffer.data.ping))); @@ -75,17 +72,16 @@ mod pingpong { move c } } - type pong = pipes::SendPacketBuffered; } } mod test { - #[legacy_exports]; use pipes::recv; use pingpong::{ping, pong}; - fn client(-chan: pingpong::client::ping) { + pub fn client(-chan: pingpong::client::ping) { use pingpong::client; let chan = client::ping(move chan); return; @@ -94,7 +90,7 @@ mod test { log(error, "Received pong"); } - fn server(-chan: pingpong::server::ping) { + pub fn server(-chan: pingpong::server::ping) { use pingpong::server; let ping(chan) = recv(move chan); return; diff --git a/src/test/run-pass/pipe-pingpong-proto.rs b/src/test/run-pass/pipe-pingpong-proto.rs index 88db8953b8c..700e583fa75 100644 --- a/src/test/run-pass/pipe-pingpong-proto.rs +++ b/src/test/run-pass/pipe-pingpong-proto.rs @@ -12,6 +12,7 @@ // An example to make sure the protocol parsing syntax extension works. +use core::option; proto! pingpong ( ping:send { @@ -24,11 +25,10 @@ proto! pingpong ( ) mod test { - #[legacy_exports]; - use pipes::recv; + use core::pipes::recv; use pingpong::{ping, pong}; - fn client(-chan: pingpong::client::ping) { + pub fn client(-chan: pingpong::client::ping) { use pingpong::client; let chan = client::ping(move chan); @@ -37,7 +37,7 @@ mod test { log(error, ~"Received pong"); } - fn server(-chan: pingpong::server::ping) { + pub fn server(-chan: pingpong::server::ping) { use pingpong::server; let ping(chan) = recv(move chan); diff --git a/src/test/run-pass/trait-static-method-overwriting.rs b/src/test/run-pass/trait-static-method-overwriting.rs index 17309d27900..c2751145e6d 100644 --- a/src/test/run-pass/trait-static-method-overwriting.rs +++ b/src/test/run-pass/trait-static-method-overwriting.rs @@ -17,7 +17,7 @@ mod base { dummy: (), } - pub impl Foo : base::HasNew { + pub impl Foo : ::base::HasNew { static pure fn new() -> Foo { unsafe { io::println("Foo"); } Foo { dummy: () } @@ -28,7 +28,7 @@ mod base { dummy: (), } - pub impl Bar : base::HasNew { + pub impl Bar : ::base::HasNew { static pure fn new() -> Bar { unsafe { io::println("Bar"); } Bar { dummy: () }