about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-06 15:34:10 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-06 15:34:10 -0800
commit771fe9026a38cb673d0928fea1f6ebd4ba796e43 (patch)
treeeec8f16ffcd231cbdb822662a4aaca76eb10bcf0 /src/libstd
parent3892dd1eaa9e1c52aba0179b9d6e27a5ced0afc7 (diff)
parent9f07d055f7823ac0e17e014f3effa2a0be0947e9 (diff)
downloadrust-771fe9026a38cb673d0928fea1f6ebd4ba796e43.tar.gz
rust-771fe9026a38cb673d0928fea1f6ebd4ba796e43.zip
rollup merge of #20607: nrc/kinds
Conflicts:
	src/libcore/array.rs
	src/libcore/cell.rs
	src/libcore/prelude.rs
	src/libstd/path/posix.rs
	src/libstd/prelude/v1.rs
	src/test/compile-fail/dst-sized-trait-param.rs
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/map.rs2
-rw-r--r--src/libstd/collections/hash/set.rs2
-rw-r--r--src/libstd/collections/hash/table.rs2
-rw-r--r--src/libstd/hash.rs2
-rw-r--r--src/libstd/io/mod.rs2
-rw-r--r--src/libstd/io/stdio.rs2
-rw-r--r--src/libstd/lib.rs11
-rw-r--r--src/libstd/num/mod.rs2
-rw-r--r--src/libstd/os.rs2
-rw-r--r--src/libstd/path/mod.rs2
-rw-r--r--src/libstd/path/posix.rs4
-rw-r--r--src/libstd/prelude/v1.rs3
-rw-r--r--src/libstd/rand/os.rs2
-rw-r--r--src/libstd/rt/mod.rs2
-rw-r--r--src/libstd/sync/mpsc/blocking.rs4
-rw-r--r--src/libstd/sync/mpsc/mod.rs2
-rw-r--r--src/libstd/sync/mpsc/select.rs2
-rw-r--r--src/libstd/sync/mutex.rs2
-rw-r--r--src/libstd/sync/once.rs2
-rw-r--r--src/libstd/sync/rwlock.rs2
-rw-r--r--src/libstd/sys/common/mutex.rs2
-rw-r--r--src/libstd/sys/unix/c.rs8
-rw-r--r--src/libstd/sys/unix/mutex.rs2
-rw-r--r--src/libstd/thread.rs2
-rw-r--r--src/libstd/thread_local/mod.rs4
-rw-r--r--src/libstd/thread_local/scoped.rs8
-rw-r--r--src/libstd/thunk.rs2
27 files changed, 42 insertions, 40 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 66287a1eea5..a329c7dd90e 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 kinds::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 a2ffb9cb213..8eaa112f0a1 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::kinds::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 1eb4408eedc..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 kinds::{Copy, Sized, marker};
+use marker::{Copy, Sized, self};
 use mem::{min_align_of, size_of};
 use mem;
 use num::{Int, UnsignedInt};
diff --git a/src/libstd/hash.rs b/src/libstd/hash.rs
index ac2b01e995e..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::kinds::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 dc9dd7071b1..576e9ee77d6 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 kinds::Sized;
+use marker::Sized;
 use mem::transmute;
 use ops::{FnOnce, Index};
 use option::Option;
diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs
index d7bc572106e..9ee2f5705b8 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 kinds::{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 660487f3edb..e3c5fcf7552 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -18,7 +18,7 @@
 //!
 //! The [`ptr`](ptr/index.html) and [`mem`](mem/index.html)
 //! modules deal with unsafe pointers and memory manipulation.
-//! [`kinds`](kinds/index.html) defines the special built-in traits,
+//! [`markers`](markers/index.html) defines the special built-in traits,
 //! and [`raw`](raw/index.html) the runtime representation of Rust types.
 //! These are some of the lowest-level building blocks in Rust.
 //!
@@ -134,7 +134,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::kinds;
+#[cfg(test)] pub use realstd::marker;
 #[cfg(test)] pub use realstd::ops;
 #[cfg(test)] pub use realstd::cmp;
 #[cfg(test)] pub use realstd::boxed;
@@ -151,7 +151,8 @@ pub use core::default;
 pub use core::finally;
 pub use core::intrinsics;
 pub use core::iter;
-#[cfg(not(test))] pub use core::kinds;
+#[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;
@@ -282,7 +283,9 @@ mod std {
     pub use vec; // used for vec![]
     pub use cell; // used for tls!
     pub use thread_local; // used for thread_local!
-    pub use kinds; // used for tls!
+    #[cfg(stage0)]
+    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 e3402984ae5..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 kinds::Copy;
+use marker::Copy;
 use clone::Clone;
 use cmp::{PartialOrd, PartialEq};
 
diff --git a/src/libstd/os.rs b/src/libstd/os.rs
index 5d23f2a9b93..b0bd6af57df 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 kinds::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 0448e6907e3..cc418cb510b 100644
--- a/src/libstd/path/mod.rs
+++ b/src/libstd/path/mod.rs
@@ -61,7 +61,7 @@
 
 #![experimental]
 
-use core::kinds::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 7c5455ed3fc..a307132810e 100644
--- a/src/libstd/path/posix.rs
+++ b/src/libstd/path/posix.rs
@@ -17,8 +17,8 @@ use hash;
 use io::Writer;
 use iter::{AdditiveIterator, Extend};
 use iter::{Iterator, IteratorExt, Map};
-use prelude::v1::Index;
-use kinds::Sized;
+use ops::Index;
+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 d0dcf77002f..06a9303e0d7 100644
--- a/src/libstd/prelude/v1.rs
+++ b/src/libstd/prelude/v1.rs
@@ -13,9 +13,8 @@
 #![stable]
 
 // Reexported core operators
-#[stable] #[doc(no_inline)] pub use kinds::{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, FullRange};
-#[unstable] #[doc(no_inline)] pub use ops::{Index, IndexMut};
 
 // Reexported functions
 #[stable] #[doc(no_inline)] pub use mem::drop;
diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs
index b64da403c8b..e697a1adeb5 100644
--- a/src/libstd/rand/os.rs
+++ b/src/libstd/rand/os.rs
@@ -182,7 +182,7 @@ mod imp {
     extern crate libc;
 
     use io::{IoResult};
-    use kinds::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 2d54fc36ca8..5ef55f5b487 100644
--- a/src/libstd/rt/mod.rs
+++ b/src/libstd/rt/mod.rs
@@ -23,7 +23,7 @@
 
 #![allow(dead_code)]
 
-use kinds::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 faff5f09f81..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 kinds::{Sync, Send};
-use kinds::marker::{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 7c18b8a43fa..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 kinds::marker;
+use marker;
 use mem;
 use cell::UnsafeCell;
 
diff --git a/src/libstd/sync/mpsc/select.rs b/src/libstd/sync/mpsc/select.rs
index 16adbf5aa4f..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::kinds::marker;
+use core::marker;
 use core::mem;
 use core::uint;
 
diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs
index 6b3dd89f33b..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 kinds::marker;
+use marker;
 use ops::{Deref, DerefMut};
 use sync::poison::{self, TryLockError, TryLockResult, LockResult};
 use sys_common::mutex as sys;
diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs
index aa2d957a3eb..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 kinds::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 4afd5bb63f4..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 kinds::marker;
+use marker;
 use ops::{Deref, DerefMut};
 use sync::poison::{self, LockResult, TryLockError, TryLockResult};
 use sys_common::rwlock as sys;
diff --git a/src/libstd/sys/common/mutex.rs b/src/libstd/sys/common/mutex.rs
index 567c26956ef..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 kinds::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 ca419d1c7f4..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 ::kinds::Send for sigaction { }
-    unsafe impl ::kinds::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 ::kinds::Send for sigaction { }
-    unsafe impl ::kinds::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 81f8659d6ae..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 kinds::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 cc82d38ae2a..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 kinds::{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 c11162c09bc..4d47703d30f 100644
--- a/src/libstd/thread_local/mod.rs
+++ b/src/libstd/thread_local/mod.rs
@@ -345,7 +345,7 @@ mod imp {
         pub dtor_running: UnsafeCell<bool>, // should be Cell
     }
 
-    unsafe impl<T> ::kinds::Sync for Key<T> { }
+    unsafe impl<T> ::marker::Sync for Key<T> { }
 
     #[doc(hidden)]
     impl<T> Key<T> {
@@ -471,7 +471,7 @@ mod imp {
         pub os: OsStaticKey,
     }
 
-    unsafe impl<T> ::kinds::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 714b71d5dbd..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::kinds::marker::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> ::kinds::Sync for KeyInner<T> { }
+    unsafe impl<T> ::marker::Sync for KeyInner<T> { }
 
     #[doc(hidden)]
     impl<T> KeyInner<T> {
@@ -224,7 +224,7 @@ mod imp {
 
 #[cfg(any(windows, target_os = "android", target_os = "ios", target_arch = "aarch64"))]
 mod imp {
-    use kinds::marker;
+    use marker;
     use sys_common::thread_local::StaticKey as OsStaticKey;
 
     #[doc(hidden)]
@@ -233,7 +233,7 @@ mod imp {
         pub marker: marker::InvariantType<T>,
     }
 
-    unsafe impl<T> ::kinds::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 067926042f1..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::kinds::Send;
+use core::marker::Send;
 use core::ops::FnOnce;
 
 pub struct Thunk<A=(),R=()> {