diff --git a/src/libcore/core.rc b/src/libcore/core.rc index da13145b9f6..eab66bc0e37 100644 --- a/src/libcore/core.rc +++ b/src/libcore/core.rc @@ -225,6 +225,8 @@ pub const debug : u32 = 4_u32; // The runtime interface used by the compiler #[cfg(notest)] pub mod rt; // The runtime and compiler interface to fmt! +#[cfg(stage0)] +#[path = "private/extfmt.rs"] pub mod extfmt; // Private APIs pub mod private; diff --git a/src/libcore/prelude.rs b/src/libcore/prelude.rs index b50fa265f03..1b2bfef5ecd 100644 --- a/src/libcore/prelude.rs +++ b/src/libcore/prelude.rs @@ -52,7 +52,6 @@ pub use cmp; pub use dvec; pub use either; -pub use extfmt; pub use f32; pub use f64; pub use float; diff --git a/src/libcore/private.rs b/src/libcore/private.rs index 61f2e013aba..a2656a9f73b 100644 --- a/src/libcore/private.rs +++ b/src/libcore/private.rs @@ -34,6 +34,8 @@ pub mod exchange_alloc; #[path = "private/intrinsics.rs"] pub mod intrinsics; +#[path = "private/extfmt.rs"] +pub mod extfmt; extern mod rustrt { pub unsafe fn rust_create_little_lock() -> rust_little_lock; diff --git a/src/libcore/extfmt.rs b/src/libcore/private/extfmt.rs similarity index 100% rename from src/libcore/extfmt.rs rename to src/libcore/private/extfmt.rs diff --git a/src/libsyntax/ext/fmt.rs b/src/libsyntax/ext/fmt.rs index e1e142d06eb..937bcef5c25 100644 --- a/src/libsyntax/ext/fmt.rs +++ b/src/libsyntax/ext/fmt.rs @@ -23,7 +23,7 @@ use ext::base::*; use ext::base; use ext::build::*; -use extfmt::ct::*; +use private::extfmt::ct::*; pub fn expand_syntax_ext(cx: ext_ctxt, sp: span, tts: ~[ast::token_tree]) -> base::MacResult { @@ -56,8 +56,8 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span, -> @ast::expr { fn make_path_vec(cx: ext_ctxt, ident: @~str) -> ~[ast::ident] { let intr = cx.parse_sess().interner; - return ~[intr.intern(@~"extfmt"), intr.intern(@~"rt"), - intr.intern(ident)]; + return ~[intr.intern(@~"private"), intr.intern(@~"extfmt"), + intr.intern(@~"rt"), intr.intern(ident)]; } fn make_rt_path_expr(cx: ext_ctxt, sp: span, nm: @~str) -> @ast::expr { let path = make_path_vec(cx, nm);