]> git.lizzy.rs Git - rust.git/commitdiff
libcore: Export core::from_str::FromStr from core::prelude
authorgifnksm <makoto.nksm@gmail.com>
Thu, 2 May 2013 11:20:22 +0000 (20:20 +0900)
committergifnksm <makoto.nksm@gmail.com>
Thu, 2 May 2013 11:42:54 +0000 (20:42 +0900)
13 files changed:
src/libcore/bool.rs
src/libcore/cast.rs
src/libcore/core.rc
src/libcore/flate.rs
src/libcore/num/f32.rs
src/libcore/num/f64.rs
src/libcore/num/float.rs
src/libcore/num/int-template.rs
src/libcore/num/uint-template.rs
src/libcore/pipes.rs
src/libcore/prelude.rs
src/libstd/net_url.rs
src/libstd/num/bigint.rs

index 6c60cec2595ef885f724ef1ab6a1f92935d35491..1b5855049ca61da84f0ac9d2a0abc56db08cdfac 100644 (file)
@@ -108,6 +108,7 @@ mod tests {
 
     #[test]
     fn test_bool_from_str() {
+        #[cfg(stage0)]
         use from_str::FromStr;
 
         do all_values |v| {
index 6fb737d37709f302a5f39936a86812d71b1b1f6b..22f31d52d2d54d30c8522d68b77ce1740128a7c6 100644 (file)
@@ -10,7 +10,9 @@
 
 //! Unsafe casting functions
 
+#[cfg(not(stage0))]
 use sys;
+#[cfg(not(stage0))]
 use unstable;
 
 pub mod rusti {
index f410591fdc7a3abe0bc51f4753dae240f67f4493..d8cca429f84472a85531af0bcd4d2b36f97b2479 100644 (file)
@@ -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;
 
index c3518cc8b6ee25c9175cf06c3e62a57bf8a2e26e..c18273955adab2fba98c8242b6611a0c6c5dbdbe 100644 (file)
@@ -16,7 +16,6 @@
 
 use libc;
 use libc::{c_void, size_t, c_int};
-use ptr;
 use vec;
 
 #[cfg(test)] use rand;
index a00225e85bc49f77dc62ea4895dad77c87102248..1b4c679ea07b47d43d081121c6f5e1b92f11cd5e 100644 (file)
@@ -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) }
 }
index c3bd89b0e0361f5ebc3ce535da58b9e5b103ef0d..0f7647fa8680dbf30846e3c9e5f8328f453dbbd4 100644 (file)
@@ -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) }
 }
index b487fa48782b8526490b5be22cf6c8da570d130b..16bb2aa128651ebcb8da461a47b84794a7138470 100644 (file)
@@ -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) }
 }
index fadba84a0fe93fea461e7e87f7e5efc238b6767f..090e0256abf6e29954968521b3c2d31bca5a466e 100644 (file)
@@ -10,7 +10,6 @@
 
 use T = self::inst::T;
 
-use from_str::FromStr;
 use num::{ToStrRadix, FromStrRadix};
 use num::{Zero, One, strconv};
 use prelude::*;
index f6b98989545d05d5ca43e370bcf40afd04f0afb0..379c1834543d20ab19b1fbdfc6f791f40cdf4dbd 100644 (file)
@@ -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::*;
index 145997fcb4bd533844b0a4465b68148704218991..19674900f908e07d55f74b733f3f3ea11e9a44d4 100644 (file)
@@ -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));
index 4527fcf2923da0102de0e973cbd4d702e4925fcf..e3c57097471f25adf585266d6b9da60250e6753e 100644 (file)
@@ -51,6 +51,7 @@
 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};
index f3b11c132798cfe3c2b7a3d6a2c99b13fad21503..fa872ffee87e6f89a5704aa02fff0bfeb7630c24 100644 (file)
 #[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)
     }
index e2a336027fdef962c3b4e5dd70516c6fcd95ead0..497ce7f41aae368fe7865785da9061de249df305 100644 (file)
@@ -21,7 +21,6 @@
 
 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)