diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2015-01-07 11:33:42 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2015-01-07 12:10:31 +1300 |
| commit | 9f07d055f7823ac0e17e014f3effa2a0be0947e9 (patch) | |
| tree | b4a0f390cd26323522cbcfaf7ba2464fc5f13bb2 /src/libcore | |
| parent | 91ba66fa99830d4963d6adb47439b86253bf5a4c (diff) | |
| download | rust-9f07d055f7823ac0e17e014f3effa2a0be0947e9.tar.gz rust-9f07d055f7823ac0e17e014f3effa2a0be0947e9.zip | |
markers -> marker
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/array.rs | 2 | ||||
| -rw-r--r-- | src/libcore/atomic.rs | 2 | ||||
| -rw-r--r-- | src/libcore/borrow.rs | 2 | ||||
| -rw-r--r-- | src/libcore/cell.rs | 6 | ||||
| -rw-r--r-- | src/libcore/clone.rs | 2 | ||||
| -rw-r--r-- | src/libcore/cmp.rs | 4 | ||||
| -rw-r--r-- | src/libcore/fmt/mod.rs | 2 | ||||
| -rw-r--r-- | src/libcore/iter.rs | 2 | ||||
| -rw-r--r-- | src/libcore/lib.rs | 6 | ||||
| -rw-r--r-- | src/libcore/marker.rs (renamed from src/libcore/markers.rs) | 8 | ||||
| -rw-r--r-- | src/libcore/mem.rs | 2 | ||||
| -rw-r--r-- | src/libcore/num/mod.rs | 4 | ||||
| -rw-r--r-- | src/libcore/ops.rs | 2 | ||||
| -rw-r--r-- | src/libcore/prelude.rs | 2 | ||||
| -rw-r--r-- | src/libcore/ptr.rs | 2 | ||||
| -rw-r--r-- | src/libcore/raw.rs | 2 | ||||
| -rw-r--r-- | src/libcore/slice.rs | 16 | ||||
| -rw-r--r-- | src/libcore/str/mod.rs | 2 | ||||
| -rw-r--r-- | src/libcore/ty.rs | 2 |
19 files changed, 35 insertions, 35 deletions
diff --git a/src/libcore/array.rs b/src/libcore/array.rs index f85b17fb7f0..2013c398c55 100644 --- a/src/libcore/array.rs +++ b/src/libcore/array.rs @@ -17,7 +17,7 @@ use clone::Clone; use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering}; use fmt; -use markers::Copy; +use marker::Copy; use ops::Deref; use option::Option; diff --git a/src/libcore/atomic.rs b/src/libcore/atomic.rs index 9e5bda4bf43..aee1d825bc2 100644 --- a/src/libcore/atomic.rs +++ b/src/libcore/atomic.rs @@ -72,7 +72,7 @@ use self::Ordering::*; -use markers::Sync; +use marker::Sync; use intrinsics; use cell::UnsafeCell; diff --git a/src/libcore/borrow.rs b/src/libcore/borrow.rs index c4adf724b2f..de9c79614b3 100644 --- a/src/libcore/borrow.rs +++ b/src/libcore/borrow.rs @@ -47,7 +47,7 @@ use clone::Clone; use cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd}; use fmt; -use markers::Sized; +use marker::Sized; use ops::Deref; use option::Option; use self::Cow::*; diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index ae590b1de06..7217468c74e 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -161,7 +161,7 @@ use clone::Clone; use cmp::PartialEq; use default::Default; use fmt; -use markers::{Copy, Send}; +use marker::{Copy, Send}; use ops::{Deref, DerefMut, Drop}; use option::Option; use option::Option::{None, Some}; @@ -520,11 +520,11 @@ impl<'b, T> DerefMut for RefMut<'b, T> { /// /// ```rust /// use std::cell::UnsafeCell; -/// use std::markers; +/// use std::marker; /// /// struct NotThreadSafe<T> { /// value: UnsafeCell<T>, -/// marker: markers::NoSync +/// marker: marker::NoSync /// } /// ``` /// diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index 78a5848f34d..3149247a83a 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -21,7 +21,7 @@ #![stable] -use markers::Sized; +use marker::Sized; /// A common trait for cloning an object. #[stable] diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index 01f1073a5d3..c3dfd5f5159 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -43,7 +43,7 @@ use self::Ordering::*; -use markers::Sized; +use marker::Sized; use option::Option::{self, Some, None}; /// Trait for equality comparisons which are [partial equivalence relations]( @@ -316,7 +316,7 @@ pub fn partial_max<T: PartialOrd>(v1: T, v2: T) -> Option<T> { mod impls { use cmp::{PartialOrd, Ord, PartialEq, Eq, Ordering}; use cmp::Ordering::{Less, Greater, Equal}; - use markers::Sized; + use marker::Sized; use option::Option; use option::Option::{Some, None}; diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index ed01cf64769..c7ff0f938b6 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -15,7 +15,7 @@ use any; use cell::{Cell, Ref, RefMut}; use iter::{Iterator, IteratorExt, range}; -use markers::{Copy, Sized}; +use marker::{Copy, Sized}; use mem; use option::Option; use option::Option::{Some, None}; diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index ac5804c910d..97d26b5333a 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -67,7 +67,7 @@ use num::{ToPrimitive, Int}; use ops::{Add, Deref, FnMut}; use option::Option; use option::Option::{Some, None}; -use std::markers::Sized; +use std::marker::Sized; use uint; /// An interface for dealing with "external iterators". These types of iterators diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index c06dc056d20..98b1e8db89f 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -111,7 +111,7 @@ pub mod ptr; /* Core language traits */ -pub mod markers; +pub mod marker; pub mod ops; pub mod cmp; pub mod clone; @@ -151,8 +151,8 @@ mod std { pub use clone; pub use cmp; #[cfg(stage0)] - pub use markers as kinds; - pub use markers; + pub use marker as kinds; + pub use marker; pub use option; pub use fmt; pub use hash; diff --git a/src/libcore/markers.rs b/src/libcore/marker.rs index f218eaceee2..d400cb47cbf 100644 --- a/src/libcore/markers.rs +++ b/src/libcore/marker.rs @@ -87,7 +87,7 @@ pub trait Copy { /// /// Users writing their own types with interior mutability (or anything /// else that is not thread-safe) should use the `NoSync` marker type -/// (from `std::markers`) to ensure that the compiler doesn't +/// (from `std::marker`) to ensure that the compiler doesn't /// consider the user-defined type to be `Sync`. Any types with /// interior mutability must also use the `std::cell::UnsafeCell` wrapper /// around the value(s) which can be mutated when behind a `&` @@ -140,10 +140,10 @@ pub unsafe trait Sync { #[unstable = "likely to change with new variance strategy"] #[lang="covariant_type"] #[derive(PartialEq, Eq, PartialOrd, Ord)] -pub struct CovariantType<Sized? T>; +pub struct CovariantType<T: ?Sized>; -impl<Sized? T> Copy for CovariantType<T> {} -impl<Sized? T> Clone for CovariantType<T> { +impl<T: ?Sized> Copy for CovariantType<T> {} +impl<T: ?Sized> Clone for CovariantType<T> { fn clone(&self) -> CovariantType<T> { *self } } diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 24cb649ce55..8438c9b206e 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -15,7 +15,7 @@ #![stable] -use markers::Sized; +use marker::Sized; use intrinsics; use ptr; diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 25833741024..046406ee4d9 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -21,7 +21,7 @@ use cmp::{PartialEq, Eq}; use cmp::{PartialOrd, Ord}; use intrinsics; use iter::IteratorExt; -use markers::Copy; +use marker::Copy; use mem::size_of; use ops::{Add, Sub, Mul, Div, Rem, Neg}; use ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr}; @@ -992,7 +992,7 @@ impl_to_primitive_float! { f64 } /// A generic trait for converting a number to a value. #[experimental = "trait is likely to be removed"] -pub trait FromPrimitive : ::markers::Sized { +pub trait FromPrimitive : ::marker::Sized { /// Convert an `int` to return an optional value of this type. If the /// value cannot be represented by this value, the `None` is returned. #[inline] diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 287a725a33c..239aa6058cc 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -63,7 +63,7 @@ use clone::Clone; use iter::{Step, Iterator,DoubleEndedIterator,ExactSizeIterator}; -use markers::Sized; +use marker::Sized; use option::Option::{self, Some, None}; /// The `Drop` trait is used to run some code when a value goes out of scope. This diff --git a/src/libcore/prelude.rs b/src/libcore/prelude.rs index 558e451ee8c..c175b83e760 100644 --- a/src/libcore/prelude.rs +++ b/src/libcore/prelude.rs @@ -29,7 +29,7 @@ //! ``` // Reexported core operators -pub use markers::{Copy, Send, Sized, Sync}; +pub use marker::{Copy, Send, Sized, Sync}; pub use ops::{Drop, Fn, FnMut, FnOnce}; // Reexported functions diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 40c7d60a205..c35d948165a 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -92,7 +92,7 @@ use mem; use clone::Clone; use intrinsics; use option::Option::{self, Some, None}; -use markers::{Send, Sized, Sync}; +use marker::{Send, Sized, Sync}; use cmp::{PartialEq, Eq, Ord, PartialOrd}; use cmp::Ordering::{self, Less, Equal, Greater}; diff --git a/src/libcore/raw.rs b/src/libcore/raw.rs index 57f1706dc43..1ad6d43f76f 100644 --- a/src/libcore/raw.rs +++ b/src/libcore/raw.rs @@ -18,7 +18,7 @@ //! //! Their definition should always match the ABI defined in `rustc::back::abi`. -use markers::Copy; +use marker::Copy; use mem; /// The representation of a Rust slice diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index e4a15d38535..3d55d09ccf1 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -41,7 +41,7 @@ use cmp::Ordering::{Less, Equal, Greater}; use cmp; use default::Default; use iter::*; -use markers::Copy; +use marker::Copy; use num::Int; use ops::{FnMut, self}; use option::Option; @@ -52,7 +52,7 @@ use ptr; use ptr::PtrExt; use mem; use mem::size_of; -use markers::{Sized, self}; +use marker::{Sized, self}; use raw::Repr; // Avoid conflicts with *both* the Slice trait (buggy) and the `slice::raw` module. use raw::Slice as RawSlice; @@ -169,11 +169,11 @@ impl<T> SliceExt for [T] { if mem::size_of::<T>() == 0 { Iter {ptr: p, end: (p as uint + self.len()) as *const T, - marker: markers::ContravariantLifetime::<'a>} + marker: marker::ContravariantLifetime::<'a>} } else { Iter {ptr: p, end: p.offset(self.len() as int), - marker: markers::ContravariantLifetime::<'a>} + marker: marker::ContravariantLifetime::<'a>} } } } @@ -322,11 +322,11 @@ impl<T> SliceExt for [T] { if mem::size_of::<T>() == 0 { IterMut {ptr: p, end: (p as uint + self.len()) as *mut T, - marker: markers::ContravariantLifetime::<'a>} + marker: marker::ContravariantLifetime::<'a>} } else { IterMut {ptr: p, end: p.offset(self.len() as int), - marker: markers::ContravariantLifetime::<'a>} + marker: marker::ContravariantLifetime::<'a>} } } } @@ -734,7 +734,7 @@ macro_rules! make_slice { pub struct Iter<'a, T: 'a> { ptr: *const T, end: *const T, - marker: markers::ContravariantLifetime<'a> + marker: marker::ContravariantLifetime<'a> } #[experimental] @@ -809,7 +809,7 @@ impl<'a, T> RandomAccessIterator for Iter<'a, T> { pub struct IterMut<'a, T: 'a> { ptr: *mut T, end: *mut T, - marker: markers::ContravariantLifetime<'a>, + marker: marker::ContravariantLifetime<'a>, } #[experimental] diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index f1f3cabb66b..d9db50b0d5a 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -23,7 +23,7 @@ use default::Default; use iter::range; use iter::ExactSizeIterator; use iter::{Map, Iterator, IteratorExt, DoubleEndedIterator}; -use markers::Sized; +use marker::Sized; use mem; use num::Int; use ops::{Fn, FnMut}; diff --git a/src/libcore/ty.rs b/src/libcore/ty.rs index 9de3cf30dc9..35c1cb09281 100644 --- a/src/libcore/ty.rs +++ b/src/libcore/ty.rs @@ -10,4 +10,4 @@ //! Types dealing with unsafe actions. -use markers; +use marker; |
