From 3792eb2a3847f7891a7d3a1941aa7833626baa5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20L=C3=B6bel?= Date: Wed, 20 Feb 2013 21:08:25 +0100 Subject: [PATCH] Moved core::extfmt to core::private::extfmt Needs a snapshot to remove stage0 extfmt export in core --- src/libcore/core.rc | 2 ++ src/libcore/prelude.rs | 1 - src/libcore/private.rs | 2 ++ src/libcore/{ => private}/extfmt.rs | 0 src/libsyntax/ext/fmt.rs | 6 +++--- 5 files changed, 7 insertions(+), 4 deletions(-) rename src/libcore/{ => private}/extfmt.rs (100%) 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 d967912221d..2c1a18fa882 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);