#[test]
fn test_bool_from_str() {
+ #[cfg(stage0)]
use from_str::FromStr;
do all_values |v| {
//! Unsafe casting functions
+#[cfg(not(stage0))]
use sys;
+#[cfg(not(stage0))]
use unstable;
pub mod rusti {
pub use num::{Primitive, Int, Float};
pub use ptr::Ptr;
+pub use from_str::FromStr;
pub use to_str::ToStr;
pub use clone::Clone;
use libc;
use libc::{c_void, size_t, c_int};
-use ptr;
use vec;
#[cfg(test)] use rand;
//! Operations and constants for `f32`
-use from_str;
use num::{Zero, One, strconv};
use prelude::*;
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) }
}
//! Operations and constants for `f64`
-use from_str;
use libc::c_int;
use num::{Zero, One, strconv};
use prelude::*;
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) }
}
// PORT this must match in width according to architecture
-use from_str;
use libc::c_int;
use num::{Zero, One, strconv};
use prelude::*;
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) }
}
use T = self::inst::T;
-use from_str::FromStr;
use num::{ToStrRadix, FromStrRadix};
use num::{Zero, One, strconv};
use prelude::*;
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::*;
}
#[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);
}
#[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));
}
#[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));
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};
#[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)]
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)
}
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.
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)
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)