mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-25 21:34:18 +00:00
impl str
This commit is contained in:
parent
b2f37554bf
commit
5b118f5ecd
@ -27,6 +27,7 @@
|
||||
#![feature(box_syntax)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(core)]
|
||||
#![feature(lang_items)]
|
||||
#![feature(staged_api)]
|
||||
#![feature(unboxed_closures)]
|
||||
#![feature(unicode)]
|
||||
@ -162,7 +163,10 @@ mod prelude {
|
||||
|
||||
// in core and collections (may differ).
|
||||
pub use slice::{AsSlice, SliceExt};
|
||||
#[cfg(stage0)]
|
||||
pub use str::{Str, StrExt};
|
||||
#[cfg(not(stage0))]
|
||||
pub use str::Str;
|
||||
|
||||
// from other crates.
|
||||
pub use alloc::boxed::Box;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -23,6 +23,7 @@ use ops::Deref;
|
||||
use option::Option::{self, Some, None};
|
||||
use result::Result::{self, Ok, Err};
|
||||
use slice::{self, SliceExt};
|
||||
#[cfg(stage0)]
|
||||
use str::StrExt;
|
||||
use string::String;
|
||||
use vec::Vec;
|
||||
|
@ -25,7 +25,10 @@ use result::Result::{Ok, Err};
|
||||
use result;
|
||||
use slice::{self, SliceExt};
|
||||
use string::String;
|
||||
#[cfg(stage0)]
|
||||
use str::{self, StrExt};
|
||||
#[cfg(not(stage0))]
|
||||
use str;
|
||||
use vec::Vec;
|
||||
|
||||
pub use self::buffered::{BufReader, BufWriter, BufStream, LineWriter};
|
||||
|
@ -24,6 +24,7 @@ use num::{self, Int, Float, ToPrimitive};
|
||||
use num::FpCategory as Fp;
|
||||
use ops::FnMut;
|
||||
use slice::SliceExt;
|
||||
#[cfg(stage0)]
|
||||
use str::StrExt;
|
||||
use string::String;
|
||||
use vec::Vec;
|
||||
|
@ -269,6 +269,7 @@ use result::Result;
|
||||
use result::Result::{Ok, Err};
|
||||
use sys;
|
||||
use slice::SliceExt;
|
||||
#[cfg(stage0)]
|
||||
use str::StrExt;
|
||||
use str;
|
||||
use string::String;
|
||||
|
@ -27,7 +27,10 @@ use option::Option;
|
||||
use option::Option::{None, Some};
|
||||
use result::Result::{self, Ok, Err};
|
||||
use slice::SliceExt;
|
||||
#[cfg(stage0)]
|
||||
use str::{FromStr, StrExt};
|
||||
#[cfg(not(stage0))]
|
||||
use str::FromStr;
|
||||
use vec::Vec;
|
||||
|
||||
pub type Port = u16;
|
||||
|
@ -761,7 +761,7 @@ mod tests {
|
||||
use old_io::{Truncate, Write, TimedOut, timer, process, FileNotFound};
|
||||
use prelude::v1::{Ok, Err, range, drop, Some, None, Vec};
|
||||
use prelude::v1::{Path, String, Reader, Writer, Clone};
|
||||
use prelude::v1::{SliceExt, Str, StrExt, AsSlice, ToString, GenericPath};
|
||||
use prelude::v1::{SliceExt, Str, AsSlice, ToString, GenericPath};
|
||||
use old_io::fs::PathExtensions;
|
||||
use old_io::timer::*;
|
||||
use rt::running_on_valgrind;
|
||||
|
@ -44,6 +44,7 @@ use ptr;
|
||||
use result::Result::{Ok, Err};
|
||||
use rt;
|
||||
use slice::SliceExt;
|
||||
#[cfg(stage0)]
|
||||
use str::StrExt;
|
||||
use string::String;
|
||||
use sys::{fs, tty};
|
||||
|
@ -21,6 +21,7 @@ use option::Option;
|
||||
use old_path::{Path, GenericPath};
|
||||
use rand::{Rng, thread_rng};
|
||||
use result::Result::{Ok, Err};
|
||||
#[cfg(stage0)]
|
||||
use str::StrExt;
|
||||
use string::String;
|
||||
|
||||
|
@ -72,6 +72,7 @@ use iter::IteratorExt;
|
||||
use option::Option;
|
||||
use option::Option::{None, Some};
|
||||
use str;
|
||||
#[cfg(stage0)]
|
||||
use str::StrExt;
|
||||
use string::{String, CowString};
|
||||
use slice::SliceExt;
|
||||
|
@ -21,7 +21,10 @@ use marker::Sized;
|
||||
use option::Option::{self, Some, None};
|
||||
use result::Result::{self, Ok, Err};
|
||||
use slice::{AsSlice, Split, SliceExt, SliceConcatExt};
|
||||
#[cfg(stage0)]
|
||||
use str::{self, FromStr, StrExt};
|
||||
#[cfg(not(stage0))]
|
||||
use str::{self, FromStr};
|
||||
use vec::Vec;
|
||||
|
||||
use super::{BytesContainer, GenericPath, GenericPathUnsafe};
|
||||
@ -448,7 +451,7 @@ mod tests {
|
||||
use option::Option::{self, Some, None};
|
||||
use old_path::GenericPath;
|
||||
use slice::{AsSlice, SliceExt};
|
||||
use str::{self, Str, StrExt};
|
||||
use str::{self, Str};
|
||||
use string::ToString;
|
||||
use vec::Vec;
|
||||
|
||||
|
@ -28,7 +28,10 @@ use mem;
|
||||
use option::Option::{self, Some, None};
|
||||
use result::Result::{self, Ok, Err};
|
||||
use slice::{SliceExt, SliceConcatExt};
|
||||
#[cfg(stage0)]
|
||||
use str::{SplitTerminator, FromStr, StrExt};
|
||||
#[cfg(not(stage0))]
|
||||
use str::{SplitTerminator, FromStr};
|
||||
use string::{String, ToString};
|
||||
use vec::Vec;
|
||||
|
||||
|
@ -57,7 +57,10 @@ use ptr;
|
||||
use result::Result::{Err, Ok};
|
||||
use result::Result;
|
||||
use slice::{AsSlice, SliceExt};
|
||||
#[cfg(stage0)]
|
||||
use str::{Str, StrExt};
|
||||
#[cfg(not(stage0))]
|
||||
use str::Str;
|
||||
use str;
|
||||
use string::{String, ToString};
|
||||
use sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT, Ordering};
|
||||
|
@ -46,8 +46,12 @@
|
||||
#[doc(no_inline)] pub use result::Result::{self, Ok, Err};
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[doc(no_inline)] pub use slice::{SliceExt, SliceConcatExt, AsSlice};
|
||||
#[cfg(stage0)]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[doc(no_inline)] pub use str::{Str, StrExt};
|
||||
#[cfg(not(stage0))]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[doc(no_inline)] pub use str::Str;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[doc(no_inline)] pub use string::{String, ToString};
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
@ -533,7 +533,7 @@ mod tests {
|
||||
use io::prelude::*;
|
||||
use prelude::v1::{Ok, Err, drop, Some, Vec};
|
||||
use prelude::v1::{String, Clone};
|
||||
use prelude::v1::{SliceExt, Str, StrExt, AsSlice, ToString, GenericPath};
|
||||
use prelude::v1::{SliceExt, Str, AsSlice, ToString, GenericPath};
|
||||
use old_path;
|
||||
use old_io::fs::PathExtensions;
|
||||
use rt::running_on_valgrind;
|
||||
|
@ -20,5 +20,4 @@ fn main() {
|
||||
//~^^ HELP #1: `core::slice::SliceExt`
|
||||
//~^^^ HELP #2: `core::str::StrExt`
|
||||
//~^^^^ HELP #3: `collections::slice::SliceExt`
|
||||
//~^^^^^ HELP #4: `collections::str::StrExt`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user