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/libstd | |
| parent | 91ba66fa99830d4963d6adb47439b86253bf5a4c (diff) | |
| download | rust-9f07d055f7823ac0e17e014f3effa2a0be0947e9.tar.gz rust-9f07d055f7823ac0e17e014f3effa2a0be0947e9.zip | |
markers -> marker
Diffstat (limited to 'src/libstd')
27 files changed, 60 insertions, 60 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index ce9857f8243..27ea2e895f6 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -21,7 +21,7 @@ use default::Default; use fmt::{self, Show}; use hash::{Hash, Hasher, RandomSipHasher}; use iter::{self, Iterator, IteratorExt, FromIterator, Extend, Map}; -use markers::Sized; +use marker::Sized; use mem::{self, replace}; use num::{Int, UnsignedInt}; use ops::{Deref, FnMut, Index, IndexMut}; diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index d67581a12b3..5c9bbf1144c 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -13,7 +13,7 @@ use borrow::BorrowFrom; use clone::Clone; use cmp::{Eq, PartialEq}; -use core::markers::Sized; +use core::marker::Sized; use default::Default; use fmt::Show; use fmt; diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs index cdfde1958c6..6eb98da4da4 100644 --- a/src/libstd/collections/hash/table.rs +++ b/src/libstd/collections/hash/table.rs @@ -16,7 +16,7 @@ use clone::Clone; use cmp; use hash::{Hash, Hasher}; use iter::{Iterator, count}; -use markers::{Copy, Sized, self}; +use marker::{Copy, Sized, self}; use mem::{min_align_of, size_of}; use mem; use num::{Int, UnsignedInt}; @@ -72,7 +72,7 @@ pub struct RawTable<K, V> { hashes: Unique<u64>, // Because K/V do not appear directly in any of the types in the struct, // inform rustc that in fact instances of K and V are reachable from here. - marker: markers::CovariantType<(K,V)>, + marker: marker::CovariantType<(K,V)>, } struct RawBucket<K, V> { @@ -562,7 +562,7 @@ impl<K, V> RawTable<K, V> { size: 0, capacity: 0, hashes: Unique::null(), - marker: markers::CovariantType, + marker: marker::CovariantType, }; } // No need for `checked_mul` before a more restrictive check performed @@ -601,7 +601,7 @@ impl<K, V> RawTable<K, V> { capacity: capacity, size: 0, hashes: Unique(hashes), - marker: markers::CovariantType, + marker: marker::CovariantType, } } @@ -651,7 +651,7 @@ impl<K, V> RawTable<K, V> { hashes_end: unsafe { self.hashes.0.offset(self.capacity as int) }, - marker: markers::ContravariantLifetime, + marker: marker::ContravariantLifetime, } } @@ -676,7 +676,7 @@ impl<K, V> RawTable<K, V> { iter: RawBuckets { raw: raw, hashes_end: hashes_end, - marker: markers::ContravariantLifetime, + marker: marker::ContravariantLifetime, }, table: self, } @@ -689,7 +689,7 @@ impl<K, V> RawTable<K, V> { iter: RawBuckets { raw: raw, hashes_end: hashes_end, - marker: markers::ContravariantLifetime::<'static>, + marker: marker::ContravariantLifetime::<'static>, }, table: self, } @@ -703,7 +703,7 @@ impl<K, V> RawTable<K, V> { raw: raw_bucket.offset(self.capacity as int), hashes_end: raw_bucket.hash, elems_left: self.size, - marker: markers::ContravariantLifetime, + marker: marker::ContravariantLifetime, } } } @@ -713,7 +713,7 @@ impl<K, V> RawTable<K, V> { struct RawBuckets<'a, K, V> { raw: RawBucket<K, V>, hashes_end: *mut u64, - marker: markers::ContravariantLifetime<'a>, + marker: marker::ContravariantLifetime<'a>, } // FIXME(#19839) Remove in favor of `#[derive(Clone)]` @@ -722,7 +722,7 @@ impl<'a, K, V> Clone for RawBuckets<'a, K, V> { RawBuckets { raw: self.raw, hashes_end: self.hashes_end, - marker: markers::ContravariantLifetime, + marker: marker::ContravariantLifetime, } } } @@ -754,7 +754,7 @@ struct RevMoveBuckets<'a, K, V> { raw: RawBucket<K, V>, hashes_end: *mut u64, elems_left: uint, - marker: markers::ContravariantLifetime<'a>, + marker: marker::ContravariantLifetime<'a>, } impl<'a, K, V> Iterator for RevMoveBuckets<'a, K, V> { diff --git a/src/libstd/hash.rs b/src/libstd/hash.rs index 34facdc7de6..69e7e429d07 100644 --- a/src/libstd/hash.rs +++ b/src/libstd/hash.rs @@ -63,7 +63,7 @@ pub use core::hash::{Hash, Hasher, Writer, hash, sip}; -use core::markers::Sized; +use core::marker::Sized; use default::Default; use rand::Rng; use rand; diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index deae56d8a30..b9c7ab15313 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -232,7 +232,7 @@ use error::{FromError, Error}; use fmt; use int; use iter::{Iterator, IteratorExt}; -use markers::Sized; +use marker::Sized; use mem::transmute; use ops::FnOnce; use option::Option; diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 43d37543e16..ad3fb71d949 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -34,7 +34,7 @@ use failure::LOCAL_STDERR; use fmt; use io::{Reader, Writer, IoResult, IoError, OtherIoError, Buffer, standard_error, EndOfFile, LineBufferedWriter, BufferedReader}; -use markers::{Sync, Send}; +use marker::{Sync, Send}; use libc; use mem; use option::Option; diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index b258c13f12e..dd4a0287ca6 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -151,7 +151,7 @@ extern crate libc; // Make std testable by not duplicating lang items. See #2912 #[cfg(test)] extern crate "std" as realstd; -#[cfg(test)] pub use realstd::markers; +#[cfg(test)] pub use realstd::marker; #[cfg(test)] pub use realstd::ops; #[cfg(test)] pub use realstd::cmp; #[cfg(test)] pub use realstd::boxed; @@ -168,8 +168,8 @@ pub use core::default; pub use core::finally; pub use core::intrinsics; pub use core::iter; -#[cfg(stage0)] #[cfg(not(test))] pub use core::markers as kinds; -#[cfg(not(test))] pub use core::markers; +#[cfg(stage0)] #[cfg(not(test))] pub use core::marker as kinds; +#[cfg(not(test))] pub use core::marker; pub use core::mem; #[cfg(not(test))] pub use core::ops; pub use core::ptr; @@ -313,8 +313,8 @@ mod std { pub use cell; // used for tls! pub use thread_local; // used for thread_local! #[cfg(stage0)] - pub use markers as kinds; - pub use markers; // used for tls! + pub use marker as kinds; + pub use marker; // used for tls! pub use ops; // used for bitflags! // The test runner calls ::std::os::args() but really wants realstd diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs index cd78489cb85..f433cd1e664 100644 --- a/src/libstd/num/mod.rs +++ b/src/libstd/num/mod.rs @@ -19,7 +19,7 @@ #[cfg(test)] use fmt::Show; use ops::{Add, Sub, Mul, Div, Rem, Neg}; -use markers::Copy; +use marker::Copy; use clone::Clone; use cmp::{PartialOrd, PartialEq}; diff --git a/src/libstd/os.rs b/src/libstd/os.rs index 0e41d608086..2bc6d0869a5 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -37,7 +37,7 @@ use error::{FromError, Error}; use fmt; use io::{IoResult, IoError}; use iter::{Iterator, IteratorExt}; -use markers::Copy; +use marker::Copy; use libc::{c_void, c_int, c_char}; use libc; use boxed::Box; diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs index e263761acd1..18b8d1d46aa 100644 --- a/src/libstd/path/mod.rs +++ b/src/libstd/path/mod.rs @@ -61,7 +61,7 @@ #![experimental] -use core::markers::Sized; +use core::marker::Sized; use ffi::CString; use clone::Clone; use fmt; diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 03811364d30..d8bb989e19f 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -16,7 +16,7 @@ use hash; use io::Writer; use iter::{AdditiveIterator, Extend}; use iter::{Iterator, IteratorExt, Map}; -use markers::Sized; +use marker::Sized; use option::Option::{self, Some, None}; use slice::{AsSlice, Split, SliceExt, SliceConcatExt}; use str::{self, FromStr, StrExt}; diff --git a/src/libstd/prelude/v1.rs b/src/libstd/prelude/v1.rs index bf8d2a3d63b..1aab52edd8e 100644 --- a/src/libstd/prelude/v1.rs +++ b/src/libstd/prelude/v1.rs @@ -13,7 +13,7 @@ #![stable] // Reexported core operators -#[stable] #[doc(no_inline)] pub use markers::{Copy, Send, Sized, Sync}; +#[stable] #[doc(no_inline)] pub use marker::{Copy, Send, Sized, Sync}; #[stable] #[doc(no_inline)] pub use ops::{Drop, Fn, FnMut, FnOnce}; // Reexported functions diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs index 512bd2a3d6e..a7d2fb169b6 100644 --- a/src/libstd/rand/os.rs +++ b/src/libstd/rand/os.rs @@ -185,7 +185,7 @@ mod imp { extern crate libc; use io::{IoResult}; - use markers::Sync; + use marker::Sync; use mem; use os; use rand::Rng; diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 036bb7b637b..91d9ff46b86 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -23,7 +23,7 @@ #![allow(dead_code)] -use markers::Send; +use marker::Send; use ops::FnOnce; use sys; use thunk::Thunk; diff --git a/src/libstd/sync/mpsc/blocking.rs b/src/libstd/sync/mpsc/blocking.rs index af6aa803f99..f174771a3e0 100644 --- a/src/libstd/sync/mpsc/blocking.rs +++ b/src/libstd/sync/mpsc/blocking.rs @@ -13,8 +13,8 @@ use thread::Thread; use sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering}; use sync::Arc; -use markers::{Sync, Send}; -use markers::{NoSend, NoSync}; +use marker::{Sync, Send}; +use marker::{NoSend, NoSync}; use mem; use clone::Clone; diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index 4d18d9e6e9d..5dc58add665 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -319,7 +319,7 @@ use prelude::v1::*; use sync::Arc; use fmt; -use markers; +use marker; use mem; use cell::UnsafeCell; @@ -373,7 +373,7 @@ unsafe impl<T:Send> Send for Sender<T> { } pub struct SyncSender<T> { inner: Arc<RacyCell<sync::Packet<T>>>, // can't share in an arc - _marker: markers::NoSync, + _marker: marker::NoSync, } /// An error returned from the `send` function on channels. @@ -678,7 +678,7 @@ impl<T: Send> Drop for Sender<T> { impl<T: Send> SyncSender<T> { fn new(inner: Arc<RacyCell<sync::Packet<T>>>) -> SyncSender<T> { - SyncSender { inner: inner, _marker: markers::NoSync } + SyncSender { inner: inner, _marker: marker::NoSync } } /// Sends a value on this synchronous channel. diff --git a/src/libstd/sync/mpsc/select.rs b/src/libstd/sync/mpsc/select.rs index ca7120b5ead..b7bb22b3ef3 100644 --- a/src/libstd/sync/mpsc/select.rs +++ b/src/libstd/sync/mpsc/select.rs @@ -57,7 +57,7 @@ use core::prelude::*; use core::cell::Cell; -use core::markers; +use core::marker; use core::mem; use core::uint; @@ -70,7 +70,7 @@ pub struct Select { head: *mut Handle<'static, ()>, tail: *mut Handle<'static, ()>, next_id: Cell<uint>, - marker1: markers::NoSend, + marker1: marker::NoSend, } /// A handle to a receiver which is currently a member of a `Select` set of @@ -115,7 +115,7 @@ impl Select { /// rather much easier through the `select!` macro. pub fn new() -> Select { Select { - marker1: markers::NoSend, + marker1: marker::NoSend, head: 0 as *mut Handle<'static, ()>, tail: 0 as *mut Handle<'static, ()>, next_id: Cell::new(1), diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index bb5a6337646..9756d086193 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -11,7 +11,7 @@ use prelude::v1::*; use cell::UnsafeCell; -use markers; +use marker; use ops::{Deref, DerefMut}; use sync::poison::{self, TryLockError, TryLockResult, LockResult}; use sys_common::mutex as sys; @@ -166,7 +166,7 @@ pub struct MutexGuard<'a, T: 'a> { __lock: &'a StaticMutex, __data: &'a UnsafeCell<T>, __poison: poison::Guard, - __marker: markers::NoSend, + __marker: marker::NoSend, } /// Static initialization of a mutex. This constant can be used to initialize @@ -286,7 +286,7 @@ impl<'mutex, T> MutexGuard<'mutex, T> { __lock: lock, __data: data, __poison: guard, - __marker: markers::NoSend, + __marker: marker::NoSend, } }) } diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs index 11a5cad2c25..15ca4783700 100644 --- a/src/libstd/sync/once.rs +++ b/src/libstd/sync/once.rs @@ -14,7 +14,7 @@ //! example use case would be for initializing an FFI library. use int; -use markers::Sync; +use marker::Sync; use mem::drop; use ops::FnOnce; use sync::atomic::{AtomicInt, Ordering, ATOMIC_INT_INIT}; diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index f40c0cc0c0e..36f9d4228b3 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -11,7 +11,7 @@ use prelude::v1::*; use cell::UnsafeCell; -use markers; +use marker; use ops::{Deref, DerefMut}; use sync::poison::{self, LockResult, TryLockError, TryLockResult}; use sys_common::rwlock as sys; @@ -113,7 +113,7 @@ pub const RW_LOCK_INIT: StaticRwLock = StaticRwLock { pub struct RwLockReadGuard<'a, T: 'a> { __lock: &'a StaticRwLock, __data: &'a UnsafeCell<T>, - __marker: markers::NoSend, + __marker: marker::NoSend, } /// RAII structure used to release the exclusive write access of a lock when @@ -124,7 +124,7 @@ pub struct RwLockWriteGuard<'a, T: 'a> { __lock: &'a StaticRwLock, __data: &'a UnsafeCell<T>, __poison: poison::Guard, - __marker: markers::NoSend, + __marker: marker::NoSend, } impl<T: Send + Sync> RwLock<T> { @@ -309,7 +309,7 @@ impl<'rwlock, T> RwLockReadGuard<'rwlock, T> { RwLockReadGuard { __lock: lock, __data: data, - __marker: markers::NoSend, + __marker: marker::NoSend, } }) } @@ -322,7 +322,7 @@ impl<'rwlock, T> RwLockWriteGuard<'rwlock, T> { __lock: lock, __data: data, __poison: guard, - __marker: markers::NoSend, + __marker: marker::NoSend, } }) } diff --git a/src/libstd/sys/common/mutex.rs b/src/libstd/sys/common/mutex.rs index b86e6ce254a..9aea0fb3b31 100644 --- a/src/libstd/sys/common/mutex.rs +++ b/src/libstd/sys/common/mutex.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use markers::Sync; +use marker::Sync; use sys::mutex as imp; /// An OS-based mutual exclusion lock. diff --git a/src/libstd/sys/unix/c.rs b/src/libstd/sys/unix/c.rs index 968347bbfbc..cc661877bc0 100644 --- a/src/libstd/sys/unix/c.rs +++ b/src/libstd/sys/unix/c.rs @@ -165,8 +165,8 @@ mod signal { sa_restorer: *mut libc::c_void, } - unsafe impl ::markers::Send for sigaction { } - unsafe impl ::markers::Sync for sigaction { } + unsafe impl ::marker::Send for sigaction { } + unsafe impl ::marker::Sync for sigaction { } #[repr(C)] #[cfg(target_word_size = "32")] @@ -217,8 +217,8 @@ mod signal { sa_resv: [libc::c_int; 1], } - unsafe impl ::markers::Send for sigaction { } - unsafe impl ::markers::Sync for sigaction { } + unsafe impl ::marker::Send for sigaction { } + unsafe impl ::marker::Sync for sigaction { } #[repr(C)] pub struct sigset_t { diff --git a/src/libstd/sys/unix/mutex.rs b/src/libstd/sys/unix/mutex.rs index 8da25c7880d..ada8a7f2349 100644 --- a/src/libstd/sys/unix/mutex.rs +++ b/src/libstd/sys/unix/mutex.rs @@ -9,7 +9,7 @@ // except according to those terms. use cell::UnsafeCell; -use markers::Sync; +use marker::Sync; use sys::sync as ffi; use sys_common::mutex; diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs index 630087e2291..43abd96e46d 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread.rs @@ -128,7 +128,7 @@ use any::Any; use boxed::Box; use cell::UnsafeCell; use clone::Clone; -use markers::{Send, Sync}; +use marker::{Send, Sync}; use ops::{Drop, FnOnce}; use option::Option::{self, Some, None}; use result::Result::{Err, Ok}; diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread_local/mod.rs index bf01b578b1f..15b98e1aff0 100644 --- a/src/libstd/thread_local/mod.rs +++ b/src/libstd/thread_local/mod.rs @@ -346,7 +346,7 @@ mod imp { pub dtor_running: UnsafeCell<bool>, // should be Cell } - unsafe impl<T> ::markers::Sync for Key<T> { } + unsafe impl<T> ::marker::Sync for Key<T> { } #[doc(hidden)] impl<T> Key<T> { @@ -472,7 +472,7 @@ mod imp { pub os: OsStaticKey, } - unsafe impl<T> ::markers::Sync for Key<T> { } + unsafe impl<T> ::marker::Sync for Key<T> { } struct Value<T: 'static> { key: &'static Key<T>, diff --git a/src/libstd/thread_local/scoped.rs b/src/libstd/thread_local/scoped.rs index a643d2cb8ee..1fb5652bc0c 100644 --- a/src/libstd/thread_local/scoped.rs +++ b/src/libstd/thread_local/scoped.rs @@ -108,7 +108,7 @@ macro_rules! __scoped_thread_local_inner { const _INIT: __Key<$t> = __Key { inner: ::std::thread_local::scoped::__impl::KeyInner { inner: ::std::thread_local::scoped::__impl::OS_INIT, - marker: ::std::markers::InvariantType, + marker: ::std::marker::InvariantType, } }; @@ -211,7 +211,7 @@ mod imp { #[doc(hidden)] pub struct KeyInner<T> { pub inner: UnsafeCell<*mut T> } - unsafe impl<T> ::markers::Sync for KeyInner<T> { } + unsafe impl<T> ::marker::Sync for KeyInner<T> { } #[doc(hidden)] impl<T> KeyInner<T> { @@ -224,16 +224,16 @@ mod imp { #[cfg(any(windows, target_os = "android", target_os = "ios", target_arch = "aarch64"))] mod imp { - use markers; + use marker; use sys_common::thread_local::StaticKey as OsStaticKey; #[doc(hidden)] pub struct KeyInner<T> { pub inner: OsStaticKey, - pub marker: markers::InvariantType<T>, + pub marker: marker::InvariantType<T>, } - unsafe impl<T> ::markers::Sync for KeyInner<T> { } + unsafe impl<T> ::marker::Sync for KeyInner<T> { } #[doc(hidden)] impl<T> KeyInner<T> { diff --git a/src/libstd/thunk.rs b/src/libstd/thunk.rs index ec9dd86f941..1830a4df54a 100644 --- a/src/libstd/thunk.rs +++ b/src/libstd/thunk.rs @@ -12,7 +12,7 @@ #![allow(missing_docs)] use alloc::boxed::Box; -use core::markers::Send; +use core::marker::Send; use core::ops::FnOnce; pub struct Thunk<A=(),R=()> { |
