Change from core::ops::RangeFull to std::ops
This commit is contained in:
parent
bf2b473816
commit
023d49e347
|
@ -111,8 +111,9 @@ mod std {
|
||||||
pub use core::option; // necessary for panic!()
|
pub use core::option; // necessary for panic!()
|
||||||
pub use core::clone; // derive(Clone)
|
pub use core::clone; // derive(Clone)
|
||||||
pub use core::cmp; // derive(Eq, Ord, etc.)
|
pub use core::cmp; // derive(Eq, Ord, etc.)
|
||||||
pub use core::marker; // derive(Copy)
|
pub use core::marker; // derive(Copy)
|
||||||
pub use core::hash; // derive(Hash)
|
pub use core::hash; // derive(Hash)
|
||||||
|
pub use core::ops; // RangeFull
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
|
@ -147,15 +147,15 @@ mod array;
|
||||||
mod core {
|
mod core {
|
||||||
pub use panicking;
|
pub use panicking;
|
||||||
pub use fmt;
|
pub use fmt;
|
||||||
pub use ops;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
mod std {
|
mod std {
|
||||||
pub use clone;
|
pub use clone;
|
||||||
pub use cmp;
|
pub use cmp;
|
||||||
pub use marker;
|
|
||||||
pub use option;
|
|
||||||
pub use fmt;
|
pub use fmt;
|
||||||
pub use hash;
|
pub use hash;
|
||||||
|
pub use marker;
|
||||||
|
pub use ops;
|
||||||
|
pub use option;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use test::Bencher;
|
use test::Bencher;
|
||||||
use core::ops::{Range, FullRange, RangeFrom, RangeTo};
|
use core::ops::{Range, RangeFull, RangeFrom, RangeTo};
|
||||||
|
|
||||||
// Overhead of dtors
|
// Overhead of dtors
|
||||||
|
|
||||||
|
@ -64,5 +64,5 @@ fn test_range_to() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_full_range() {
|
fn test_full_range() {
|
||||||
// Not much to test.
|
// Not much to test.
|
||||||
let _ = FullRange;
|
let _ = RangeFull;
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,5 +310,4 @@ mod std {
|
||||||
pub use slice;
|
pub use slice;
|
||||||
|
|
||||||
pub use boxed; // used for vec![]
|
pub use boxed; // used for vec![]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2532,7 +2532,7 @@ impl<'a> Parser<'a> {
|
||||||
// something for RangeFull.
|
// something for RangeFull.
|
||||||
hi = self.last_span.hi;
|
hi = self.last_span.hi;
|
||||||
|
|
||||||
let idents = vec![token::str_to_ident("core"),
|
let idents = vec![token::str_to_ident("std"),
|
||||||
token::str_to_ident("ops"),
|
token::str_to_ident("ops"),
|
||||||
token::str_to_ident("RangeFull")];
|
token::str_to_ident("RangeFull")];
|
||||||
let segments = idents.into_iter().map(|ident| {
|
let segments = idents.into_iter().map(|ident| {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use ::core::ops::RangeFull;
|
use ::std::ops::RangeFull;
|
||||||
|
|
||||||
fn test<T : Clone>(arg: T) -> T {
|
fn test<T : Clone>(arg: T) -> T {
|
||||||
arg.clone()
|
arg.clone()
|
||||||
|
|
Loading…
Reference in New Issue