about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgifnksm <makoto.nksm@gmail.com>2013-05-02 20:20:22 +0900
committergifnksm <makoto.nksm@gmail.com>2013-05-02 20:42:54 +0900
commitcff6aba76ea01888854a87bdd4c1f71aada8d250 (patch)
treeaa7f0b125c65a4554e7160f3f0b07f4f7400883c
parent5458d7dddda38f063220a19191373faecf11065f (diff)
downloadrust-cff6aba76ea01888854a87bdd4c1f71aada8d250.tar.gz
rust-cff6aba76ea01888854a87bdd4c1f71aada8d250.zip
libcore: Export core::from_str::FromStr from core::prelude
-rw-r--r--src/libcore/bool.rs1
-rw-r--r--src/libcore/cast.rs2
-rw-r--r--src/libcore/core.rc1
-rw-r--r--src/libcore/flate.rs1
-rw-r--r--src/libcore/num/f32.rs3
-rw-r--r--src/libcore/num/f64.rs3
-rw-r--r--src/libcore/num/float.rs3
-rw-r--r--src/libcore/num/int-template.rs1
-rw-r--r--src/libcore/num/uint-template.rs1
-rw-r--r--src/libcore/pipes.rs6
-rw-r--r--src/libcore/prelude.rs1
-rw-r--r--src/libstd/net_url.rs8
-rw-r--r--src/libstd/num/bigint.rs5
13 files changed, 16 insertions, 20 deletions
diff --git a/src/libcore/bool.rs b/src/libcore/bool.rs
index 6c60cec2595..1b5855049ca 100644
--- a/src/libcore/bool.rs
+++ b/src/libcore/bool.rs
@@ -108,6 +108,7 @@ mod tests {
 
     #[test]
     fn test_bool_from_str() {
+        #[cfg(stage0)]
         use from_str::FromStr;
 
         do all_values |v| {
diff --git a/src/libcore/cast.rs b/src/libcore/cast.rs
index 6fb737d3770..22f31d52d2d 100644
--- a/src/libcore/cast.rs
+++ b/src/libcore/cast.rs
@@ -10,7 +10,9 @@
 
 //! Unsafe casting functions
 
+#[cfg(not(stage0))]
 use sys;
+#[cfg(not(stage0))]
 use unstable;
 
 pub mod rusti {
diff --git a/src/libcore/core.rc b/src/libcore/core.rc
index f410591fdc7..d8cca429f84 100644
--- a/src/libcore/core.rc
+++ b/src/libcore/core.rc
@@ -111,6 +111,7 @@ pub use num::{Bitwise, BitCount, Bounded};
 pub use num::{Primitive, Int, Float};
 
 pub use ptr::Ptr;
+pub use from_str::FromStr;
 pub use to_str::ToStr;
 pub use clone::Clone;
 
diff --git a/src/libcore/flate.rs b/src/libcore/flate.rs
index c3518cc8b6e..c18273955ad 100644
--- a/src/libcore/flate.rs
+++ b/src/libcore/flate.rs
@@ -16,7 +16,6 @@ Simple compression
 
 use libc;
 use libc::{c_void, size_t, c_int};
-use ptr;
 use vec;
 
 #[cfg(test)] use rand;
diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs
index a00225e85bc..1b4c679ea07 100644
--- a/src/libcore/num/f32.rs
+++ b/src/libcore/num/f32.rs
@@ -10,7 +10,6 @@
 
 //! Operations and constants for `f32`
 
-use from_str;
 use num::{Zero, One, strconv};
 use prelude::*;
 
@@ -798,7 +797,7 @@ pub fn from_str_radix(num: &str, rdx: uint) -> Option<f32> {
                              strconv::ExpNone, false, false)
 }
 
-impl from_str::FromStr for f32 {
+impl FromStr for f32 {
     #[inline(always)]
     fn from_str(val: &str) -> Option<f32> { from_str(val) }
 }
diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs
index c3bd89b0e03..0f7647fa868 100644
--- a/src/libcore/num/f64.rs
+++ b/src/libcore/num/f64.rs
@@ -10,7 +10,6 @@
 
 //! Operations and constants for `f64`
 
-use from_str;
 use libc::c_int;
 use num::{Zero, One, strconv};
 use prelude::*;
@@ -840,7 +839,7 @@ pub fn from_str_radix(num: &str, rdx: uint) -> Option<f64> {
                              strconv::ExpNone, false, false)
 }
 
-impl from_str::FromStr for f64 {
+impl FromStr for f64 {
     #[inline(always)]
     fn from_str(val: &str) -> Option<f64> { from_str(val) }
 }
diff --git a/src/libcore/num/float.rs b/src/libcore/num/float.rs
index b487fa48782..16bb2aa1286 100644
--- a/src/libcore/num/float.rs
+++ b/src/libcore/num/float.rs
@@ -20,7 +20,6 @@
 
 // PORT this must match in width according to architecture
 
-use from_str;
 use libc::c_int;
 use num::{Zero, One, strconv};
 use prelude::*;
@@ -289,7 +288,7 @@ pub fn from_str_radix(num: &str, radix: uint) -> Option<float> {
                              strconv::ExpNone, false, false)
 }
 
-impl from_str::FromStr for float {
+impl FromStr for float {
     #[inline(always)]
     fn from_str(val: &str) -> Option<float> { from_str(val) }
 }
diff --git a/src/libcore/num/int-template.rs b/src/libcore/num/int-template.rs
index fadba84a0fe..090e0256abf 100644
--- a/src/libcore/num/int-template.rs
+++ b/src/libcore/num/int-template.rs
@@ -10,7 +10,6 @@
 
 use T = self::inst::T;
 
-use from_str::FromStr;
 use num::{ToStrRadix, FromStrRadix};
 use num::{Zero, One, strconv};
 use prelude::*;
diff --git a/src/libcore/num/uint-template.rs b/src/libcore/num/uint-template.rs
index f6b98989545..379c1834543 100644
--- a/src/libcore/num/uint-template.rs
+++ b/src/libcore/num/uint-template.rs
@@ -11,7 +11,6 @@
 use T = self::inst::T;
 use T_SIGNED = self::inst::T_SIGNED;
 
-use from_str::FromStr;
 use num::{ToStrRadix, FromStrRadix};
 use num::{Zero, One, strconv};
 use prelude::*;
diff --git a/src/libcore/pipes.rs b/src/libcore/pipes.rs
index 145997fcb4b..19674900f90 100644
--- a/src/libcore/pipes.rs
+++ b/src/libcore/pipes.rs
@@ -303,7 +303,7 @@ struct BufferResource<T> {
 }
 
 #[unsafe_destructor]
-impl<T> ::ops::Drop for BufferResource<T> {
+impl<T> Drop for BufferResource<T> {
     fn finalize(&self) {
         unsafe {
             let b = move_it!(self.buffer);
@@ -639,7 +639,7 @@ pub struct SendPacketBuffered<T, Tbuffer> {
 }
 
 #[unsafe_destructor]
-impl<T:Owned,Tbuffer:Owned> ::ops::Drop for SendPacketBuffered<T,Tbuffer> {
+impl<T:Owned,Tbuffer:Owned> Drop for SendPacketBuffered<T,Tbuffer> {
     fn finalize(&self) {
         //if self.p != none {
         //    debug!("drop send %?", option::get(self.p));
@@ -708,7 +708,7 @@ pub struct RecvPacketBuffered<T, Tbuffer> {
 }
 
 #[unsafe_destructor]
-impl<T:Owned,Tbuffer:Owned> ::ops::Drop for RecvPacketBuffered<T,Tbuffer> {
+impl<T:Owned,Tbuffer:Owned> Drop for RecvPacketBuffered<T,Tbuffer> {
     fn finalize(&self) {
         //if self.p != none {
         //    debug!("drop recv %?", option::get(self.p));
diff --git a/src/libcore/prelude.rs b/src/libcore/prelude.rs
index 4527fcf2923..e3c57097471 100644
--- a/src/libcore/prelude.rs
+++ b/src/libcore/prelude.rs
@@ -51,6 +51,7 @@ pub use path::WindowsPath;
 pub use ptr::Ptr;
 pub use ascii::{Ascii, AsciiCast, OwnedAsciiCast, AsciiStr};
 pub use str::{StrSlice, OwnedStr};
+pub use from_str::{FromStr};
 pub use to_bytes::IterBytes;
 pub use to_str::{ToStr, ToStrConsume};
 pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};
diff --git a/src/libstd/net_url.rs b/src/libstd/net_url.rs
index f3b11c13279..fa872ffee87 100644
--- a/src/libstd/net_url.rs
+++ b/src/libstd/net_url.rs
@@ -13,15 +13,13 @@
 #[allow(deprecated_mode)];
 
 use core::cmp::Eq;
+#[cfg(stage0)]
 use core::from_str::FromStr;
 use core::io::{Reader, ReaderUtil};
 use core::io;
 use core::hashmap::HashMap;
 use core::str;
-use core::to_bytes::IterBytes;
 use core::to_bytes;
-use core::to_str::ToStr;
-use core::to_str;
 use core::uint;
 
 #[deriving(Clone, Eq)]
@@ -703,13 +701,13 @@ pub fn to_str(url: &Url) -> ~str {
     fmt!("%s:%s%s%s%s", url.scheme, authority, url.path, query, fragment)
 }
 
-impl to_str::ToStr for Url {
+impl ToStr for Url {
     pub fn to_str(&self) -> ~str {
         to_str(self)
     }
 }
 
-impl to_bytes::IterBytes for Url {
+impl IterBytes for Url {
     fn iter_bytes(&self, lsb0: bool, f: to_bytes::Cb) {
         self.to_str().iter_bytes(lsb0, f)
     }
diff --git a/src/libstd/num/bigint.rs b/src/libstd/num/bigint.rs
index e2a336027fd..497ce7f41aa 100644
--- a/src/libstd/num/bigint.rs
+++ b/src/libstd/num/bigint.rs
@@ -21,7 +21,6 @@ A BigInt is a combination of BigUint and Sign.
 
 use core::cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater};
 use core::num::{IntConvertible, Zero, One, ToStrRadix, FromStrRadix};
-use core::*;
 
 /**
 A BigDigit is a BigUint's composing element.
@@ -141,7 +140,7 @@ impl ToStr for BigUint {
     fn to_str(&self) -> ~str { self.to_str_radix(10) }
 }
 
-impl from_str::FromStr for BigUint {
+impl FromStr for BigUint {
     #[inline(always)]
     fn from_str(s: &str) -> Option<BigUint> {
         FromStrRadix::from_str_radix(s, 10)
@@ -785,7 +784,7 @@ impl ToStr for BigInt {
     fn to_str(&self) -> ~str { self.to_str_radix(10) }
 }
 
-impl from_str::FromStr for BigInt {
+impl FromStr for BigInt {
     #[inline(always)]
     fn from_str(s: &str) -> Option<BigInt> {
         FromStrRadix::from_str_radix(s, 10)