]> git.lizzy.rs Git - rust.git/commitdiff
Change `std::kinds` to `std::markers`; flatten `std::kinds::marker`
authorNick Cameron <ncameron@mozilla.com>
Tue, 6 Jan 2015 01:03:46 +0000 (14:03 +1300)
committerNick Cameron <ncameron@mozilla.com>
Tue, 6 Jan 2015 20:45:28 +0000 (09:45 +1300)
[breaking-change]

154 files changed:
src/doc/guide-unsafe.md
src/liballoc/arc.rs
src/liballoc/boxed.rs
src/liballoc/rc.rs
src/libcollections/btree/map.rs
src/libcollections/lib.rs
src/libcollections/ring_buf.rs
src/libcollections/slice.rs
src/libcollections/vec.rs
src/libcore/array.rs
src/libcore/atomic.rs
src/libcore/borrow.rs
src/libcore/cell.rs
src/libcore/clone.rs
src/libcore/cmp.rs
src/libcore/fmt/mod.rs
src/libcore/iter.rs
src/libcore/kinds.rs [deleted file]
src/libcore/lib.rs
src/libcore/markers.rs [new file with mode: 0644]
src/libcore/mem.rs
src/libcore/num/mod.rs
src/libcore/ops.rs
src/libcore/prelude.rs
src/libcore/ptr.rs
src/libcore/raw.rs
src/libcore/slice.rs
src/libcore/str/mod.rs
src/libcore/ty.rs
src/libcoretest/hash/mod.rs
src/libcoretest/num/mod.rs
src/libcoretest/option.rs
src/liblibc/lib.rs
src/librand/lib.rs
src/librustc/middle/expr_use_visitor.rs
src/librustc/middle/infer/unify.rs
src/librustc_typeck/variance.rs
src/libstd/collections/hash/map.rs
src/libstd/collections/hash/set.rs
src/libstd/collections/hash/table.rs
src/libstd/hash.rs
src/libstd/io/mod.rs
src/libstd/io/stdio.rs
src/libstd/lib.rs
src/libstd/num/mod.rs
src/libstd/os.rs
src/libstd/path/mod.rs
src/libstd/path/posix.rs
src/libstd/prelude/v1.rs
src/libstd/rand/os.rs
src/libstd/rt/mod.rs
src/libstd/sync/mpsc/blocking.rs
src/libstd/sync/mpsc/mod.rs
src/libstd/sync/mpsc/select.rs
src/libstd/sync/mutex.rs
src/libstd/sync/once.rs
src/libstd/sync/rwlock.rs
src/libstd/sys/common/mutex.rs
src/libstd/sys/unix/c.rs
src/libstd/sys/unix/mutex.rs
src/libstd/thread.rs
src/libstd/thread_local/mod.rs
src/libstd/thread_local/scoped.rs
src/libstd/thunk.rs
src/libsyntax/ext/deriving/bounds.rs
src/libunicode/tables.rs
src/test/compile-fail/associated-types-unsized.rs
src/test/compile-fail/bad-method-typaram-kind.rs
src/test/compile-fail/bad-sized.rs
src/test/compile-fail/borrowck-move-out-of-static-item.rs
src/test/compile-fail/borrowck-struct-update-with-dtor.rs
src/test/compile-fail/builtin-superkinds-double-superkind.rs
src/test/compile-fail/builtin-superkinds-in-metadata.rs
src/test/compile-fail/builtin-superkinds-typaram-not-send.rs
src/test/compile-fail/check-static-values-constraints.rs
src/test/compile-fail/comm-not-freeze-receiver.rs
src/test/compile-fail/comm-not-freeze.rs
src/test/compile-fail/dst-bad-assign-2.rs
src/test/compile-fail/dst-bad-assign.rs
src/test/compile-fail/dst-bad-deep.rs
src/test/compile-fail/dst-object-from-unsized-type.rs
src/test/compile-fail/dst-sized-trait-param.rs
src/test/compile-fail/error-should-say-copy-not-pod.rs
src/test/compile-fail/issue-14366.rs
src/test/compile-fail/issue-15756.rs
src/test/compile-fail/issue-16538.rs
src/test/compile-fail/issue-17718-static-move.rs
src/test/compile-fail/issue-17718-static-sync.rs
src/test/compile-fail/issue-18107.rs
src/test/compile-fail/issue-19883.rs
src/test/compile-fail/issue-20005.rs
src/test/compile-fail/issue-3907-2.rs
src/test/compile-fail/issue-5035-2.rs
src/test/compile-fail/issue-5543.rs
src/test/compile-fail/issue-5883.rs
src/test/compile-fail/issue-7013.rs
src/test/compile-fail/issue-7364.rs
src/test/compile-fail/kindck-copy.rs
src/test/compile-fail/kindck-impl-type-params-2.rs
src/test/compile-fail/kindck-impl-type-params.rs
src/test/compile-fail/kindck-inherited-copy-bound.rs
src/test/compile-fail/kindck-nonsendable-1.rs
src/test/compile-fail/kindck-send-object.rs
src/test/compile-fail/kindck-send-object1.rs
src/test/compile-fail/kindck-send-object2.rs
src/test/compile-fail/kindck-send-unsafe.rs
src/test/compile-fail/lint-dead-code-4.rs
src/test/compile-fail/marker-no-copy.rs
src/test/compile-fail/marker-no-send.rs
src/test/compile-fail/marker-no-share.rs
src/test/compile-fail/mut-not-freeze.rs
src/test/compile-fail/mutable-enum-indirect.rs
src/test/compile-fail/no-send-res-ports.rs
src/test/compile-fail/no_send-enum.rs
src/test/compile-fail/no_send-rc.rs
src/test/compile-fail/no_send-struct.rs
src/test/compile-fail/no_share-enum.rs
src/test/compile-fail/no_share-rc.rs
src/test/compile-fail/no_share-struct.rs
src/test/compile-fail/opt-out-copy-bad.rs
src/test/compile-fail/range-1.rs
src/test/compile-fail/regions-infer-contravariance-due-to-decl.rs
src/test/compile-fail/regions-infer-covariance-due-to-decl.rs
src/test/compile-fail/regions-infer-invariance-due-to-decl.rs
src/test/compile-fail/repeat-to-run-dtor-twice.rs
src/test/compile-fail/static-items-cant-move.rs
src/test/compile-fail/syntax-trait-polarity-feature-gate.rs
src/test/compile-fail/syntax-trait-polarity.rs
src/test/compile-fail/task-rng-isnt-sendable.rs
src/test/compile-fail/trait-bounds-not-on-bare-trait.rs
src/test/compile-fail/typeck-unsafe-always-share.rs
src/test/compile-fail/unboxed-closure-sugar-region.rs
src/test/compile-fail/unique-unique-kind.rs
src/test/compile-fail/unsendable-class.rs
src/test/compile-fail/unsized-bare-typaram.rs
src/test/compile-fail/unsized-enum.rs
src/test/compile-fail/unsized-struct.rs
src/test/compile-fail/unsized-trait-impl-trait-arg.rs
src/test/compile-fail/unsized3.rs
src/test/compile-fail/unsized5.rs
src/test/compile-fail/unsized6.rs
src/test/compile-fail/unsized7.rs
src/test/compile-fail/where-clause-constraints-are-local-for-inherent-impl.rs
src/test/compile-fail/where-clause-constraints-are-local-for-trait-impl.rs
src/test/run-pass/associated-types-impl-redirect.rs
src/test/run-pass/associated-types-where-clause-impl-ambiguity.rs
src/test/run-pass/const-block.rs
src/test/run-pass/fsu-moves-and-copies.rs
src/test/run-pass/hrtb-opt-in-copy.rs
src/test/run-pass/issue-17718-static-unsafe-interior.rs
src/test/run-pass/issue-2718.rs
src/test/run-pass/method-recursive-blanket-impl.rs
src/test/run-pass/regions-infer-bivariance.rs
src/test/run-pass/syntax-trait-polarity.rs

index bda1b34563208e0317b958b1b1f9e029b7b1d902..11bc0bc30f20ee863fb614b1376da2786fcc4e4a 100644 (file)
@@ -703,10 +703,10 @@ Other features provided by lang items include:
   `deref`, and `add` respectively.
 - stack unwinding and general failure; the `eh_personality`, `fail`
   and `fail_bounds_checks` lang items.
-- the traits in `std::kinds` used to indicate types that satisfy
+- the traits in `std::markers` used to indicate types of
   various kinds; lang items `send`, `sync` and `copy`.
 - the marker types and variance indicators found in
-  `std::kinds::markers`; lang items `covariant_type`,
+  `std::markers`; lang items `covariant_type`,
   `contravariant_lifetime`, `no_sync_bound`, etc.
 
 Lang items are loaded lazily by the compiler; e.g. if one never uses
index 25f80ad11bd1124b87ef34445b799b4dd67f80cf..a3b77ccb6dbda567b2f1e1c9cfdeb7681ff9fbef 100644 (file)
@@ -74,7 +74,7 @@
 use core::fmt::{self, Show};
 use core::cmp::{Eq, Ord, PartialEq, PartialOrd, Ordering};
 use core::default::Default;
-use core::kinds::{Sync, Send};
+use core::markers::{Sync, Send};
 use core::mem::{min_align_of, size_of, drop};
 use core::mem;
 use core::nonzero::NonZero;
index 6df8bb5f7aaf4b146b76b88ea00850932c17b7e3..0b211c7c2125652a69bca6bd37a486e5aedb6a6b 100644 (file)
@@ -18,7 +18,7 @@
 use core::default::Default;
 use core::fmt;
 use core::hash::{self, Hash};
-use core::kinds::Sized;
+use core::markers::Sized;
 use core::mem;
 use core::option::Option;
 use core::ptr::Unique;
index 175bba4e71dc46f9671f04658e5a3b034914a43e..c6eaaaeecca1bed4c33ae342a2d11fadff765218 100644 (file)
 use core::default::Default;
 use core::fmt;
 use core::hash::{self, Hash};
-use core::kinds::marker;
+use core::markers;
 use core::mem::{transmute, min_align_of, size_of, forget};
 use core::nonzero::NonZero;
 use core::ops::{Deref, Drop};
@@ -175,8 +175,8 @@ pub struct Rc<T> {
     // FIXME #12808: strange names to try to avoid interfering with field accesses of the contained
     // type via Deref
     _ptr: NonZero<*mut RcBox<T>>,
-    _nosend: marker::NoSend,
-    _noshare: marker::NoSync
+    _nosend: markers::NoSend,
+    _noshare: markers::NoSync
 }
 
 impl<T> Rc<T> {
@@ -201,8 +201,8 @@ pub fn new(value: T) -> Rc<T> {
                     strong: Cell::new(1),
                     weak: Cell::new(1)
                 })),
-                _nosend: marker::NoSend,
-                _noshare: marker::NoSync
+                _nosend: markers::NoSend,
+                _noshare: markers::NoSync
             }
         }
     }
@@ -223,8 +223,8 @@ pub fn downgrade(&self) -> Weak<T> {
         self.inc_weak();
         Weak {
             _ptr: self._ptr,
-            _nosend: marker::NoSend,
-            _noshare: marker::NoSync
+            _nosend: markers::NoSend,
+            _noshare: markers::NoSync
         }
     }
 }
@@ -431,7 +431,7 @@ impl<T> Clone for Rc<T> {
     #[inline]
     fn clone(&self) -> Rc<T> {
         self.inc_strong();
-        Rc { _ptr: self._ptr, _nosend: marker::NoSend, _noshare: marker::NoSync }
+        Rc { _ptr: self._ptr, _nosend: markers::NoSend, _noshare: markers::NoSync }
     }
 }
 
@@ -622,8 +622,8 @@ pub struct Weak<T> {
     // FIXME #12808: strange names to try to avoid interfering with
     // field accesses of the contained type via Deref
     _ptr: NonZero<*mut RcBox<T>>,
-    _nosend: marker::NoSend,
-    _noshare: marker::NoSync
+    _nosend: markers::NoSend,
+    _noshare: markers::NoSync
 }
 
 #[experimental = "Weak pointers may not belong in this module."]
@@ -650,7 +650,7 @@ pub fn upgrade(&self) -> Option<Rc<T>> {
             None
         } else {
             self.inc_strong();
-            Some(Rc { _ptr: self._ptr, _nosend: marker::NoSend, _noshare: marker::NoSync })
+            Some(Rc { _ptr: self._ptr, _nosend: markers::NoSend, _noshare: markers::NoSync })
         }
     }
 }
@@ -717,7 +717,7 @@ impl<T> Clone for Weak<T> {
     #[inline]
     fn clone(&self) -> Weak<T> {
         self.inc_weak();
-        Weak { _ptr: self._ptr, _nosend: marker::NoSend, _noshare: marker::NoSync }
+        Weak { _ptr: self._ptr, _nosend: markers::NoSend, _noshare: markers::NoSync }
     }
 }
 
index b85ea65f5ce5880140611f8be2d09687be61c5d0..73cc46091e99a89317c46c9a8a896a76ba414ecc 100644 (file)
@@ -480,7 +480,7 @@ enum Continuation<A, B> {
 /// boilerplate gets cut out.
 mod stack {
     use core::prelude::*;
-    use core::kinds::marker;
+    use core::markers;
     use core::mem;
     use core::ops::{Deref, DerefMut};
     use super::BTreeMap;
@@ -494,7 +494,7 @@ mod stack {
     /// where `&'static` can be used in any function expecting any lifetime reference.
     pub struct IdRef<'id, T: 'id> {
         inner: &'id mut T,
-        marker: marker::InvariantLifetime<'id>
+        marker: markers::InvariantLifetime<'id>
     }
 
     impl<'id, T> Deref for IdRef<'id, T> {
@@ -536,7 +536,7 @@ pub struct SearchStack<'a, K:'a, V:'a, Type, NodeType> {
     pub struct Pusher<'id, 'a, K:'a, V:'a> {
         map: &'a mut BTreeMap<K, V>,
         stack: Stack<K, V>,
-        marker: marker::InvariantLifetime<'id>
+        marker: markers::InvariantLifetime<'id>
     }
 
     impl<'a, K, V> PartialSearchStack<'a, K, V> {
@@ -571,11 +571,11 @@ pub fn with<T, F: for<'id> FnOnce(Pusher<'id, 'a, K, V>,
             let pusher = Pusher {
                 map: self.map,
                 stack: self.stack,
-                marker: marker::InvariantLifetime
+                marker: markers::InvariantLifetime
             };
             let node = IdRef {
                 inner: unsafe { &mut *self.next },
-                marker: marker::InvariantLifetime
+                marker: markers::InvariantLifetime
             };
 
             closure(pusher, node)
index 5bf5f78af94c272381f14d4581bdb9b1946d9c00..cbe5d2404e7301ec8e145a18f8b841c55a268622 100644 (file)
@@ -123,7 +123,9 @@ mod std {
     pub use core::option;   // necessary for panic!()
     pub use core::clone;    // deriving(Clone)
     pub use core::cmp;      // deriving(Eq, Ord, etc.)
-    pub use core::kinds;    // deriving(Copy)
+    #[cfg(stage0)]
+    pub use core::markers as kinds;
+    pub use core::markers;  // deriving(Copy)
     pub use core::hash;     // deriving(Hash)
 }
 
@@ -138,7 +140,7 @@ mod prelude {
     pub use core::iter::{FromIterator, Extend, IteratorExt};
     pub use core::iter::{Iterator, DoubleEndedIterator, RandomAccessIterator};
     pub use core::iter::{ExactSizeIterator};
-    pub use core::kinds::{Copy, Send, Sized, Sync};
+    pub use core::markers::{Copy, Send, Sized, Sync};
     pub use core::mem::drop;
     pub use core::ops::{Drop, Fn, FnMut, FnOnce};
     pub use core::option::Option;
index 11775f62b1c547660826fcef88d1164d00cdf0be..3c1cd101e3b865bac425b942c0aad423fa9fd646 100644 (file)
@@ -20,7 +20,7 @@
 use core::default::Default;
 use core::fmt;
 use core::iter::{self, repeat, FromIterator, RandomAccessIterator};
-use core::kinds::marker;
+use core::markers;
 use core::mem;
 use core::num::{Int, UnsignedInt};
 use core::ops::{Index, IndexMut};
@@ -534,7 +534,7 @@ pub fn iter_mut<'a>(&'a mut self) -> IterMut<'a, T> {
             head: self.head,
             cap: self.cap,
             ptr: self.ptr,
-            marker: marker::ContravariantLifetime::<'a>,
+            marker: markers::ContravariantLifetime::<'a>,
         }
     }
 
@@ -1414,7 +1414,7 @@ pub struct IterMut<'a, T:'a> {
     tail: uint,
     head: uint,
     cap: uint,
-    marker: marker::ContravariantLifetime<'a>,
+    marker: markers::ContravariantLifetime<'a>,
 }
 
 #[stable]
index 9e5aa7d645ba0ac8783b745add1fd592013dbe88..d7e0b3d93532d8304a42f5c61b329982adae794c 100644 (file)
@@ -95,7 +95,7 @@
 use core::cmp::{self, Ord, PartialEq};
 use core::iter::{Iterator, IteratorExt};
 use core::iter::{range, range_step, MultiplicativeIterator};
-use core::kinds::Sized;
+use core::markers::Sized;
 use core::mem::size_of;
 use core::mem;
 use core::ops::{FnMut, SliceMut};
index 99231e7253c3ce31f48baa0f8929ac9fdbcf156c..b3b560a23bdebcaa93f424f89997fdf4a7b37229 100644 (file)
@@ -55,7 +55,7 @@
 use core::fmt;
 use core::hash::{self, Hash};
 use core::iter::{repeat, FromIterator};
-use core::kinds::marker::{ContravariantLifetime, InvariantType};
+use core::markers::{ContravariantLifetime, InvariantType};
 use core::mem;
 use core::nonzero::NonZero;
 use core::num::{Int, UnsignedInt};
index ba7714ad9bc8cb321b9a1db2eb0d89eac3bf9e61..f85b17fb7f09ba5e2830016ece3049fee0fb58e3 100644 (file)
@@ -17,7 +17,7 @@
 use clone::Clone;
 use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering};
 use fmt;
-use kinds::Copy;
+use markers::Copy;
 use ops::Deref;
 use option::Option;
 
index 15c20253c8bc78b1c739b28c14215e9484886455..9e5bda4bf43c89caadce22f0bb210d2c74993e3f 100644 (file)
@@ -72,7 +72,7 @@
 
 use self::Ordering::*;
 
-use kinds::Sync;
+use markers::Sync;
 
 use intrinsics;
 use cell::UnsafeCell;
index 2c08b97635580c0504df846247a117644a491602..c4adf724b2f71cb9bfd195cf49a065134537675d 100644 (file)
@@ -47,7 +47,7 @@
 use clone::Clone;
 use cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
 use fmt;
-use kinds::Sized;
+use markers::Sized;
 use ops::Deref;
 use option::Option;
 use self::Cow::*;
index fd18d6ac3f3b409e389b599e5292343feccb720f..ae590b1de061b1b9e58afd8aa393edf006a58a8e 100644 (file)
 use cmp::PartialEq;
 use default::Default;
 use fmt;
-use kinds::{Copy, Send};
+use markers::{Copy, Send};
 use ops::{Deref, DerefMut, Drop};
 use option::Option;
 use option::Option::{None, Some};
@@ -520,11 +520,11 @@ fn deref_mut<'a>(&'a mut self) -> &'a mut T {
 ///
 /// ```rust
 /// use std::cell::UnsafeCell;
-/// use std::kinds::marker;
+/// use std::markers;
 ///
 /// struct NotThreadSafe<T> {
 ///     value: UnsafeCell<T>,
-///     marker: marker::NoSync
+///     marker: markers::NoSync
 /// }
 /// ```
 ///
index 17991659f97899c6027021eae8a8dceecccd54a6..78a5848f34dd6aaac571138ac5cfe95bc540e332 100644 (file)
@@ -21,7 +21,7 @@
 
 #![stable]
 
-use kinds::Sized;
+use markers::Sized;
 
 /// A common trait for cloning an object.
 #[stable]
index af5e98ed303240a9684c8207d9f4375eb208ccac..01f1073a5d390c7eb930354644b40d82a8d02bfb 100644 (file)
@@ -43,7 +43,7 @@
 
 use self::Ordering::*;
 
-use kinds::Sized;
+use markers::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 kinds::Sized;
+    use markers::Sized;
     use option::Option;
     use option::Option::{Some, None};
 
index 951f5c29f00e8c923c5520e0bb9c0c341360f7b7..ed01cf647697390552f76b93c4bbf27802064249 100644 (file)
@@ -15,7 +15,7 @@
 use any;
 use cell::{Cell, Ref, RefMut};
 use iter::{Iterator, IteratorExt, range};
-use kinds::{Copy, Sized};
+use markers::{Copy, Sized};
 use mem;
 use option::Option;
 use option::Option::{Some, None};
index e5753f6cc2e7857e6e76c3a7cc3d4eaa5e151b89..ac5804c910d093c95b156361e5716664a938525b 100644 (file)
@@ -67,7 +67,7 @@
 use ops::{Add, Deref, FnMut};
 use option::Option;
 use option::Option::{Some, None};
-use std::kinds::Sized;
+use std::markers::Sized;
 use uint;
 
 /// An interface for dealing with "external iterators". These types of iterators
diff --git a/src/libcore/kinds.rs b/src/libcore/kinds.rs
deleted file mode 100644 (file)
index 5d69938..0000000
+++ /dev/null
@@ -1,298 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Primitive traits representing basic 'kinds' of types
-//!
-//! Rust types can be classified in various useful ways according to
-//! intrinsic properties of the type. These classifications, often called
-//! 'kinds', are represented as traits.
-//!
-//! They cannot be implemented by user code, but are instead implemented
-//! by the compiler automatically for the types to which they apply.
-
-/// Types able to be transferred across task boundaries.
-#[lang="send"]
-pub unsafe trait Send : 'static {
-    // empty.
-}
-
-/// Types with a constant size known at compile-time.
-#[lang="sized"]
-pub trait Sized {
-    // Empty.
-}
-
-/// Types that can be copied by simply copying bits (i.e. `memcpy`).
-#[lang="copy"]
-pub trait Copy {
-    // Empty.
-}
-
-/// Types that can be safely shared between tasks when aliased.
-///
-/// The precise definition is: a type `T` is `Sync` if `&T` is
-/// thread-safe. In other words, there is no possibility of data races
-/// when passing `&T` references between tasks.
-///
-/// As one would expect, primitive types like `u8` and `f64` are all
-/// `Sync`, and so are simple aggregate types containing them (like
-/// tuples, structs and enums). More instances of basic `Sync` types
-/// include "immutable" types like `&T` and those with simple
-/// inherited mutability, such as `Box<T>`, `Vec<T>` and most other
-/// collection types. (Generic parameters need to be `Sync` for their
-/// container to be `Sync`.)
-///
-/// A somewhat surprising consequence of the definition is `&mut T` is
-/// `Sync` (if `T` is `Sync`) even though it seems that it might
-/// provide unsynchronised mutation. The trick is a mutable reference
-/// stored in an aliasable reference (that is, `& &mut T`) becomes
-/// read-only, as if it were a `& &T`, hence there is no risk of a data
-/// race.
-///
-/// Types that are not `Sync` are those that have "interior
-/// mutability" in a non-thread-safe way, such as `Cell` and `RefCell`
-/// in `std::cell`. These types allow for mutation of their contents
-/// even when in an immutable, aliasable slot, e.g. the contents of
-/// `&Cell<T>` can be `.set`, and do not ensure data races are
-/// impossible, hence they cannot be `Sync`. A higher level example
-/// of a non-`Sync` type is the reference counted pointer
-/// `std::rc::Rc`, because any reference `&Rc<T>` can clone a new
-/// reference, which modifies the reference counts in a non-atomic
-/// way.
-///
-/// For cases when one does need thread-safe interior mutability,
-/// types like the atomics in `std::sync` and `Mutex` & `RWLock` in
-/// the `sync` crate do ensure that any mutation cannot cause data
-/// races.  Hence these types are `Sync`.
-///
-/// Users writing their own types with interior mutability (or anything
-/// else that is not thread-safe) should use the `NoSync` marker type
-/// (from `std::kinds::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 `&`
-/// reference; not doing this is undefined behaviour (for example,
-/// `transmute`-ing from `&T` to `&mut T` is illegal).
-#[lang="sync"]
-pub unsafe trait Sync {
-    // Empty
-}
-
-/// Marker types are special types that are used with unsafe code to
-/// inform the compiler of special constraints. Marker types should
-/// only be needed when you are creating an abstraction that is
-/// implemented using unsafe code. In that case, you may want to embed
-/// some of the marker types below into your type.
-pub mod marker {
-    use super::{Copy,Sized};
-    use clone::Clone;
-
-    /// A marker type whose type parameter `T` is considered to be
-    /// covariant with respect to the type itself. This is (typically)
-    /// used to indicate that an instance of the type `T` is being stored
-    /// into memory and read from, even though that may not be apparent.
-    ///
-    /// For more information about variance, refer to this Wikipedia
-    /// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
-    ///
-    /// *Note:* It is very unusual to have to add a covariant constraint.
-    /// If you are not sure, you probably want to use `InvariantType`.
-    ///
-    /// # Example
-    ///
-    /// Given a struct `S` that includes a type parameter `T`
-    /// but does not actually *reference* that type parameter:
-    ///
-    /// ```ignore
-    /// use std::mem;
-    ///
-    /// struct S<T> { x: *() }
-    /// fn get<T>(s: &S<T>) -> T {
-    ///    unsafe {
-    ///        let x: *T = mem::transmute(s.x);
-    ///        *x
-    ///    }
-    /// }
-    /// ```
-    ///
-    /// The type system would currently infer that the value of
-    /// the type parameter `T` is irrelevant, and hence a `S<int>` is
-    /// a subtype of `S<Box<int>>` (or, for that matter, `S<U>` for
-    /// any `U`). But this is incorrect because `get()` converts the
-    /// `*()` into a `*T` and reads from it. Therefore, we should include the
-    /// a marker field `CovariantType<T>` to inform the type checker that
-    /// `S<T>` is a subtype of `S<U>` if `T` is a subtype of `U`
-    /// (for example, `S<&'static int>` is a subtype of `S<&'a int>`
-    /// for some lifetime `'a`, but not the other way around).
-    #[lang="covariant_type"]
-    #[derive(PartialEq, Eq, PartialOrd, Ord)]
-    pub struct CovariantType<T: ?Sized>;
-
-    impl<T: ?Sized> Copy for CovariantType<T> {}
-    impl<T: ?Sized> Clone for CovariantType<T> {
-        fn clone(&self) -> CovariantType<T> { *self }
-    }
-
-    /// A marker type whose type parameter `T` is considered to be
-    /// contravariant with respect to the type itself. This is (typically)
-    /// used to indicate that an instance of the type `T` will be consumed
-    /// (but not read from), even though that may not be apparent.
-    ///
-    /// For more information about variance, refer to this Wikipedia
-    /// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
-    ///
-    /// *Note:* It is very unusual to have to add a contravariant constraint.
-    /// If you are not sure, you probably want to use `InvariantType`.
-    ///
-    /// # Example
-    ///
-    /// Given a struct `S` that includes a type parameter `T`
-    /// but does not actually *reference* that type parameter:
-    ///
-    /// ```
-    /// use std::mem;
-    ///
-    /// struct S<T> { x: *const () }
-    /// fn get<T>(s: &S<T>, v: T) {
-    ///    unsafe {
-    ///        let x: fn(T) = mem::transmute(s.x);
-    ///        x(v)
-    ///    }
-    /// }
-    /// ```
-    ///
-    /// The type system would currently infer that the value of
-    /// the type parameter `T` is irrelevant, and hence a `S<int>` is
-    /// a subtype of `S<Box<int>>` (or, for that matter, `S<U>` for
-    /// any `U`). But this is incorrect because `get()` converts the
-    /// `*()` into a `fn(T)` and then passes a value of type `T` to it.
-    ///
-    /// Supplying a `ContravariantType` marker would correct the
-    /// problem, because it would mark `S` so that `S<T>` is only a
-    /// subtype of `S<U>` if `U` is a subtype of `T`; given that the
-    /// function requires arguments of type `T`, it must also accept
-    /// arguments of type `U`, hence such a conversion is safe.
-    #[lang="contravariant_type"]
-    #[derive(PartialEq, Eq, PartialOrd, Ord)]
-    pub struct ContravariantType<T: ?Sized>;
-
-    impl<T: ?Sized> Copy for ContravariantType<T> {}
-    impl<T: ?Sized> Clone for ContravariantType<T> {
-        fn clone(&self) -> ContravariantType<T> { *self }
-    }
-
-    /// A marker type whose type parameter `T` is considered to be
-    /// invariant with respect to the type itself. This is (typically)
-    /// used to indicate that instances of the type `T` may be read or
-    /// written, even though that may not be apparent.
-    ///
-    /// For more information about variance, refer to this Wikipedia
-    /// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
-    ///
-    /// # Example
-    ///
-    /// The Cell type is an example which uses unsafe code to achieve
-    /// "interior" mutability:
-    ///
-    /// ```
-    /// pub struct Cell<T> { value: T }
-    /// # fn main() {}
-    /// ```
-    ///
-    /// The type system would infer that `value` is only read here and
-    /// never written, but in fact `Cell` uses unsafe code to achieve
-    /// interior mutability.
-    #[lang="invariant_type"]
-    #[derive(PartialEq, Eq, PartialOrd, Ord)]
-    pub struct InvariantType<T: ?Sized>;
-
-    impl<T: ?Sized> Copy for InvariantType<T> {}
-    impl<T: ?Sized> Clone for InvariantType<T> {
-        fn clone(&self) -> InvariantType<T> { *self }
-    }
-
-    /// As `CovariantType`, but for lifetime parameters. Using
-    /// `CovariantLifetime<'a>` indicates that it is ok to substitute
-    /// a *longer* lifetime for `'a` than the one you originally
-    /// started with (e.g., you could convert any lifetime `'foo` to
-    /// `'static`). You almost certainly want `ContravariantLifetime`
-    /// instead, or possibly `InvariantLifetime`. The only case where
-    /// it would be appropriate is that you have a (type-casted, and
-    /// hence hidden from the type system) function pointer with a
-    /// signature like `fn(&'a T)` (and no other uses of `'a`). In
-    /// this case, it is ok to substitute a larger lifetime for `'a`
-    /// (e.g., `fn(&'static T)`), because the function is only
-    /// becoming more selective in terms of what it accepts as
-    /// argument.
-    ///
-    /// For more information about variance, refer to this Wikipedia
-    /// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
-    #[lang="covariant_lifetime"]
-    #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
-    pub struct CovariantLifetime<'a>;
-
-    /// As `ContravariantType`, but for lifetime parameters. Using
-    /// `ContravariantLifetime<'a>` indicates that it is ok to
-    /// substitute a *shorter* lifetime for `'a` than the one you
-    /// originally started with (e.g., you could convert `'static` to
-    /// any lifetime `'foo`). This is appropriate for cases where you
-    /// have an unsafe pointer that is actually a pointer into some
-    /// memory with lifetime `'a`, and thus you want to limit the
-    /// lifetime of your data structure to `'a`. An example of where
-    /// this is used is the iterator for vectors.
-    ///
-    /// For more information about variance, refer to this Wikipedia
-    /// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
-    #[lang="contravariant_lifetime"]
-    #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
-    pub struct ContravariantLifetime<'a>;
-
-    /// As `InvariantType`, but for lifetime parameters. Using
-    /// `InvariantLifetime<'a>` indicates that it is not ok to
-    /// substitute any other lifetime for `'a` besides its original
-    /// value. This is appropriate for cases where you have an unsafe
-    /// pointer that is actually a pointer into memory with lifetime `'a`,
-    /// and this pointer is itself stored in an inherently mutable
-    /// location (such as a `Cell`).
-    #[lang="invariant_lifetime"]
-    #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
-    pub struct InvariantLifetime<'a>;
-
-    /// A type which is considered "not sendable", meaning that it cannot
-    /// be safely sent between tasks, even if it is owned. This is
-    /// typically embedded in other types, such as `Gc`, to ensure that
-    /// their instances remain thread-local.
-    #[lang="no_send_bound"]
-    #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
-    pub struct NoSend;
-
-    /// A type which is considered "not POD", meaning that it is not
-    /// implicitly copyable. This is typically embedded in other types to
-    /// ensure that they are never copied, even if they lack a destructor.
-    #[lang="no_copy_bound"]
-    #[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
-    #[allow(missing_copy_implementations)]
-    pub struct NoCopy;
-
-    /// A type which is considered "not sync", meaning that
-    /// its contents are not threadsafe, hence they cannot be
-    /// shared between tasks.
-    #[lang="no_sync_bound"]
-    #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
-    pub struct NoSync;
-
-    /// A type which is considered managed by the GC. This is typically
-    /// embedded in other types.
-    #[lang="managed_bound"]
-    #[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
-    #[allow(missing_copy_implementations)]
-    pub struct Managed;
-}
-
index aff0065c52744d8d8430b8d7b9c69ef9125213cd..c06dc056d20cb17e938c922f1954674e0895faf1 100644 (file)
 
 /* Core language traits */
 
-pub mod kinds;
+pub mod markers;
 pub mod ops;
 pub mod cmp;
 pub mod clone;
@@ -150,7 +150,9 @@ mod core {
 mod std {
     pub use clone;
     pub use cmp;
-    pub use kinds;
+    #[cfg(stage0)]
+    pub use markers as kinds;
+    pub use markers;
     pub use option;
     pub use fmt;
     pub use hash;
diff --git a/src/libcore/markers.rs b/src/libcore/markers.rs
new file mode 100644 (file)
index 0000000..0663ceb
--- /dev/null
@@ -0,0 +1,299 @@
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! Primitive traits and marker types representing basic 'kinds' of types.
+//!
+//! Rust types can be classified in various useful ways according to
+//! intrinsic properties of the type. These classifications, often called
+//! 'kinds', are represented as traits.
+//!
+//! They cannot be implemented by user code, but are instead implemented
+//! by the compiler automatically for the types to which they apply.
+//!
+//! Marker types are special types that are used with unsafe code to
+//! inform the compiler of special constraints. Marker types should
+//! only be needed when you are creating an abstraction that is
+//! implemented using unsafe code. In that case, you may want to embed
+//! some of the marker types below into your type.
+
+
+
+use clone::Clone;
+
+
+/// Types able to be transferred across task boundaries.
+#[lang="send"]
+pub unsafe trait Send: 'static {
+    // empty.
+}
+
+/// Types with a constant size known at compile-time.
+#[lang="sized"]
+pub trait Sized {
+    // Empty.
+}
+
+/// Types that can be copied by simply copying bits (i.e. `memcpy`).
+#[lang="copy"]
+pub trait Copy {
+    // Empty.
+}
+
+/// Types that can be safely shared between tasks when aliased.
+///
+/// The precise definition is: a type `T` is `Sync` if `&T` is
+/// thread-safe. In other words, there is no possibility of data races
+/// when passing `&T` references between tasks.
+///
+/// As one would expect, primitive types like `u8` and `f64` are all
+/// `Sync`, and so are simple aggregate types containing them (like
+/// tuples, structs and enums). More instances of basic `Sync` types
+/// include "immutable" types like `&T` and those with simple
+/// inherited mutability, such as `Box<T>`, `Vec<T>` and most other
+/// collection types. (Generic parameters need to be `Sync` for their
+/// container to be `Sync`.)
+///
+/// A somewhat surprising consequence of the definition is `&mut T` is
+/// `Sync` (if `T` is `Sync`) even though it seems that it might
+/// provide unsynchronised mutation. The trick is a mutable reference
+/// stored in an aliasable reference (that is, `& &mut T`) becomes
+/// read-only, as if it were a `& &T`, hence there is no risk of a data
+/// race.
+///
+/// Types that are not `Sync` are those that have "interior
+/// mutability" in a non-thread-safe way, such as `Cell` and `RefCell`
+/// in `std::cell`. These types allow for mutation of their contents
+/// even when in an immutable, aliasable slot, e.g. the contents of
+/// `&Cell<T>` can be `.set`, and do not ensure data races are
+/// impossible, hence they cannot be `Sync`. A higher level example
+/// of a non-`Sync` type is the reference counted pointer
+/// `std::rc::Rc`, because any reference `&Rc<T>` can clone a new
+/// reference, which modifies the reference counts in a non-atomic
+/// way.
+///
+/// For cases when one does need thread-safe interior mutability,
+/// types like the atomics in `std::sync` and `Mutex` & `RWLock` in
+/// the `sync` crate do ensure that any mutation cannot cause data
+/// races.  Hence these types are `Sync`.
+///
+/// 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
+/// 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 `&`
+/// reference; not doing this is undefined behaviour (for example,
+/// `transmute`-ing from `&T` to `&mut T` is illegal).
+#[lang="sync"]
+pub unsafe trait Sync {
+    // Empty
+}
+
+
+/// A marker type whose type parameter `T` is considered to be
+/// covariant with respect to the type itself. This is (typically)
+/// used to indicate that an instance of the type `T` is being stored
+/// into memory and read from, even though that may not be apparent.
+///
+/// For more information about variance, refer to this Wikipedia
+/// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
+///
+/// *Note:* It is very unusual to have to add a covariant constraint.
+/// If you are not sure, you probably want to use `InvariantType`.
+///
+/// # Example
+///
+/// Given a struct `S` that includes a type parameter `T`
+/// but does not actually *reference* that type parameter:
+///
+/// ```ignore
+/// use std::mem;
+///
+/// struct S<T> { x: *() }
+/// fn get<T>(s: &S<T>) -> T {
+///    unsafe {
+///        let x: *T = mem::transmute(s.x);
+///        *x
+///    }
+/// }
+/// ```
+///
+/// The type system would currently infer that the value of
+/// the type parameter `T` is irrelevant, and hence a `S<int>` is
+/// a subtype of `S<Box<int>>` (or, for that matter, `S<U>` for
+/// any `U`). But this is incorrect because `get()` converts the
+/// `*()` into a `*T` and reads from it. Therefore, we should include the
+/// a marker field `CovariantType<T>` to inform the type checker that
+/// `S<T>` is a subtype of `S<U>` if `T` is a subtype of `U`
+/// (for example, `S<&'static int>` is a subtype of `S<&'a int>`
+/// for some lifetime `'a`, but not the other way around).
+#[lang="covariant_type"]
+#[derive(PartialEq, Eq, PartialOrd, Ord)]
+pub struct CovariantType<Sized? T>;
+
+impl<Sized? T> Copy for CovariantType<T> {}
+impl<Sized? T> Clone for CovariantType<T> {
+    fn clone(&self) -> CovariantType<T> { *self }
+}
+
+/// A marker type whose type parameter `T` is considered to be
+/// contravariant with respect to the type itself. This is (typically)
+/// used to indicate that an instance of the type `T` will be consumed
+/// (but not read from), even though that may not be apparent.
+///
+/// For more information about variance, refer to this Wikipedia
+/// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
+///
+/// *Note:* It is very unusual to have to add a contravariant constraint.
+/// If you are not sure, you probably want to use `InvariantType`.
+///
+/// # Example
+///
+/// Given a struct `S` that includes a type parameter `T`
+/// but does not actually *reference* that type parameter:
+///
+/// ```
+/// use std::mem;
+///
+/// struct S<T> { x: *const () }
+/// fn get<T>(s: &S<T>, v: T) {
+///    unsafe {
+///        let x: fn(T) = mem::transmute(s.x);
+///        x(v)
+///    }
+/// }
+/// ```
+///
+/// The type system would currently infer that the value of
+/// the type parameter `T` is irrelevant, and hence a `S<int>` is
+/// a subtype of `S<Box<int>>` (or, for that matter, `S<U>` for
+/// any `U`). But this is incorrect because `get()` converts the
+/// `*()` into a `fn(T)` and then passes a value of type `T` to it.
+///
+/// Supplying a `ContravariantType` marker would correct the
+/// problem, because it would mark `S` so that `S<T>` is only a
+/// subtype of `S<U>` if `U` is a subtype of `T`; given that the
+/// function requires arguments of type `T`, it must also accept
+/// arguments of type `U`, hence such a conversion is safe.
+#[lang="contravariant_type"]
+#[derive(PartialEq, Eq, PartialOrd, Ord)]
+pub struct ContravariantType<T: ?Sized>;
+
+impl<T: ?Sized> Copy for ContravariantType<T> {}
+impl<T: ?Sized> Clone for ContravariantType<T> {
+    fn clone(&self) -> ContravariantType<T> { *self }
+}
+
+/// A marker type whose type parameter `T` is considered to be
+/// invariant with respect to the type itself. This is (typically)
+/// used to indicate that instances of the type `T` may be read or
+/// written, even though that may not be apparent.
+///
+/// For more information about variance, refer to this Wikipedia
+/// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
+///
+/// # Example
+///
+/// The Cell type is an example which uses unsafe code to achieve
+/// "interior" mutability:
+///
+/// ```
+/// pub struct Cell<T> { value: T }
+/// # fn main() {}
+/// ```
+///
+/// The type system would infer that `value` is only read here and
+/// never written, but in fact `Cell` uses unsafe code to achieve
+/// interior mutability.
+#[lang="invariant_type"]
+#[derive(PartialEq, Eq, PartialOrd, Ord)]
+pub struct InvariantType<T: ?Sized>;
+
+impl<T: ?Sized> Copy for InvariantType<T> {}
+impl<T: ?Sized> Clone for InvariantType<T> {
+    fn clone(&self) -> InvariantType<T> { *self }
+}
+
+/// As `CovariantType`, but for lifetime parameters. Using
+/// `CovariantLifetime<'a>` indicates that it is ok to substitute
+/// a *longer* lifetime for `'a` than the one you originally
+/// started with (e.g., you could convert any lifetime `'foo` to
+/// `'static`). You almost certainly want `ContravariantLifetime`
+/// instead, or possibly `InvariantLifetime`. The only case where
+/// it would be appropriate is that you have a (type-casted, and
+/// hence hidden from the type system) function pointer with a
+/// signature like `fn(&'a T)` (and no other uses of `'a`). In
+/// this case, it is ok to substitute a larger lifetime for `'a`
+/// (e.g., `fn(&'static T)`), because the function is only
+/// becoming more selective in terms of what it accepts as
+/// argument.
+///
+/// For more information about variance, refer to this Wikipedia
+/// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
+#[lang="covariant_lifetime"]
+#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+pub struct CovariantLifetime<'a>;
+
+/// As `ContravariantType`, but for lifetime parameters. Using
+/// `ContravariantLifetime<'a>` indicates that it is ok to
+/// substitute a *shorter* lifetime for `'a` than the one you
+/// originally started with (e.g., you could convert `'static` to
+/// any lifetime `'foo`). This is appropriate for cases where you
+/// have an unsafe pointer that is actually a pointer into some
+/// memory with lifetime `'a`, and thus you want to limit the
+/// lifetime of your data structure to `'a`. An example of where
+/// this is used is the iterator for vectors.
+///
+/// For more information about variance, refer to this Wikipedia
+/// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
+#[lang="contravariant_lifetime"]
+#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+pub struct ContravariantLifetime<'a>;
+
+/// As `InvariantType`, but for lifetime parameters. Using
+/// `InvariantLifetime<'a>` indicates that it is not ok to
+/// substitute any other lifetime for `'a` besides its original
+/// value. This is appropriate for cases where you have an unsafe
+/// pointer that is actually a pointer into memory with lifetime `'a`,
+/// and this pointer is itself stored in an inherently mutable
+/// location (such as a `Cell`).
+#[lang="invariant_lifetime"]
+#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+pub struct InvariantLifetime<'a>;
+
+/// A type which is considered "not sendable", meaning that it cannot
+/// be safely sent between tasks, even if it is owned. This is
+/// typically embedded in other types, such as `Gc`, to ensure that
+/// their instances remain thread-local.
+#[lang="no_send_bound"]
+#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+pub struct NoSend;
+
+/// A type which is considered "not POD", meaning that it is not
+/// implicitly copyable. This is typically embedded in other types to
+/// ensure that they are never copied, even if they lack a destructor.
+#[lang="no_copy_bound"]
+#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
+#[allow(missing_copy_implementations)]
+pub struct NoCopy;
+
+/// A type which is considered "not sync", meaning that
+/// its contents are not threadsafe, hence they cannot be
+/// shared between tasks.
+#[lang="no_sync_bound"]
+#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+pub struct NoSync;
+
+/// A type which is considered managed by the GC. This is typically
+/// embedded in other types.
+#[lang="managed_bound"]
+#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
+#[allow(missing_copy_implementations)]
+pub struct Managed;
index c60569161213f68949bed4524688bc4978982d93..24cb649ce55e4795b453c55d8cf3057138f5adfc 100644 (file)
@@ -15,7 +15,7 @@
 
 #![stable]
 
-use kinds::Sized;
+use markers::Sized;
 use intrinsics;
 use ptr;
 
index 192d6063f6bbc520b72256c601523b98230bcd59..258337410246d18ea877e6bcf9a6c5054fe3f245 100644 (file)
@@ -21,7 +21,7 @@
 use cmp::{PartialOrd, Ord};
 use intrinsics;
 use iter::IteratorExt;
-use kinds::Copy;
+use markers::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 @@ fn to_f64(&self) -> Option<f64> { impl_to_primitive_float_to_float!($T, f64, *se
 
 /// A generic trait for converting a number to a value.
 #[experimental = "trait is likely to be removed"]
-pub trait FromPrimitive : ::kinds::Sized {
+pub trait FromPrimitive : ::markers::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]
index 97d94e73bb33a0625764ba677ebdf97e49f8fe6f..287a725a33c26836c08eb2afdd57141ca791733c 100644 (file)
@@ -63,7 +63,7 @@
 
 use clone::Clone;
 use iter::{Step, Iterator,DoubleEndedIterator,ExactSizeIterator};
-use kinds::Sized;
+use markers::Sized;
 use option::Option::{self, Some, None};
 
 /// The `Drop` trait is used to run some code when a value goes out of scope. This
index e88cb73c8a9b7f6f8d7b6f1a0a6c1207febc3f0d..558e451ee8c2aa620e5fcad05fcf0a1cdcf7b403 100644 (file)
@@ -29,7 +29,7 @@
 //! ```
 
 // Reexported core operators
-pub use kinds::{Copy, Send, Sized, Sync};
+pub use markers::{Copy, Send, Sized, Sync};
 pub use ops::{Drop, Fn, FnMut, FnOnce};
 
 // Reexported functions
index 0b77f3456b2f5afad528d7092fc1c75eecd9aa10..40c7d60a2057c8390c7c506a0ce255c2c11e30f7 100644 (file)
@@ -92,7 +92,7 @@
 use clone::Clone;
 use intrinsics;
 use option::Option::{self, Some, None};
-use kinds::{Send, Sized, Sync};
+use markers::{Send, Sized, Sync};
 
 use cmp::{PartialEq, Eq, Ord, PartialOrd};
 use cmp::Ordering::{self, Less, Equal, Greater};
index 5ef6f6b2623aa7c97ff6ba49d443a313a8e3b9e8..57f1706dc4368012e5d03ce256b3544c9f5da89a 100644 (file)
@@ -18,7 +18,7 @@
 //!
 //! Their definition should always match the ABI defined in `rustc::back::abi`.
 
-use kinds::Copy;
+use markers::Copy;
 use mem;
 
 /// The representation of a Rust slice
index 093ed0b242f5f4d5583f839a7534ee8e697d9912..e4a15d385359cc42e83e4f4d647230a39f205b7f 100644 (file)
@@ -41,7 +41,7 @@
 use cmp;
 use default::Default;
 use iter::*;
-use kinds::Copy;
+use markers::Copy;
 use num::Int;
 use ops::{FnMut, self};
 use option::Option;
@@ -52,7 +52,7 @@
 use ptr::PtrExt;
 use mem;
 use mem::size_of;
-use kinds::{Sized, marker};
+use markers::{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 @@ fn iter<'a>(&'a self) -> Iter<'a, T> {
             if mem::size_of::<T>() == 0 {
                 Iter {ptr: p,
                       end: (p as uint + self.len()) as *const T,
-                      marker: marker::ContravariantLifetime::<'a>}
+                      marker: markers::ContravariantLifetime::<'a>}
             } else {
                 Iter {ptr: p,
                       end: p.offset(self.len() as int),
-                      marker: marker::ContravariantLifetime::<'a>}
+                      marker: markers::ContravariantLifetime::<'a>}
             }
         }
     }
@@ -322,11 +322,11 @@ fn iter_mut<'a>(&'a mut self) -> IterMut<'a, T> {
             if mem::size_of::<T>() == 0 {
                 IterMut {ptr: p,
                          end: (p as uint + self.len()) as *mut T,
-                         marker: marker::ContravariantLifetime::<'a>}
+                         marker: markers::ContravariantLifetime::<'a>}
             } else {
                 IterMut {ptr: p,
                          end: p.offset(self.len() as int),
-                         marker: marker::ContravariantLifetime::<'a>}
+                         marker: markers::ContravariantLifetime::<'a>}
             }
         }
     }
@@ -734,7 +734,7 @@ macro_rules! make_slice {
 pub struct Iter<'a, T: 'a> {
     ptr: *const T,
     end: *const T,
-    marker: marker::ContravariantLifetime<'a>
+    marker: markers::ContravariantLifetime<'a>
 }
 
 #[experimental]
@@ -809,7 +809,7 @@ fn idx(&mut self, index: uint) -> Option<&'a T> {
 pub struct IterMut<'a, T: 'a> {
     ptr: *mut T,
     end: *mut T,
-    marker: marker::ContravariantLifetime<'a>,
+    marker: markers::ContravariantLifetime<'a>,
 }
 
 #[experimental]
index a39787b8207b5161c2fcbdb54c899d0829a93e11..f1f3cabb66b10e552fdacf12a0d0e3fecd83837b 100644 (file)
@@ -23,7 +23,7 @@
 use iter::range;
 use iter::ExactSizeIterator;
 use iter::{Map, Iterator, IteratorExt, DoubleEndedIterator};
-use kinds::Sized;
+use markers::Sized;
 use mem;
 use num::Int;
 use ops::{Fn, FnMut};
index f8e03662b00eca4bc29dff6d320b777dd2fce3cf..9de3cf30dc9af6c16637d60b20b218559b475bcd 100644 (file)
@@ -10,4 +10,4 @@
 
 //! Types dealing with unsafe actions.
 
-use kinds::marker;
+use markers;
index a4bafe754ffdd812c011fafbb03f6a02fb57494f..3af38f9035dd4bc40cbb9c4f23967aa0edbcef57 100644 (file)
@@ -7,7 +7,7 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-use core::kinds::Sized;
+use core::markers::Sized;
 use std::mem;
 
 use core::slice::SliceExt;
index f86c85f821638f98813ab459ea8dab0293e00331..57e0737e909c99713dfe12acfc826f4a4ed03368 100644 (file)
@@ -12,7 +12,7 @@
 use core::fmt::Show;
 use core::num::{NumCast, cast};
 use core::ops::{Add, Sub, Mul, Div, Rem};
-use core::kinds::Copy;
+use core::markers::Copy;
 
 #[cfg_attr(stage0, macro_escape)]
 #[cfg_attr(not(stage0), macro_use)]
index 4a459992098a08b8a86dff85264e26614e760996..5588fbce26ad034e771fccb07c3d61eb4b936fb5 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use core::option::*;
-use core::kinds::marker;
+use core::markers;
 use core::mem;
 use core::clone::Clone;
 
@@ -82,7 +82,7 @@ fn test_option_dance() {
 
 #[test] #[should_fail]
 fn test_option_too_much_dance() {
-    let mut y = Some(marker::NoCopy);
+    let mut y = Some(markers::NoCopy);
     let _y2 = y.take().unwrap();
     let _y3 = y.take().unwrap();
 }
index e3f02146a75f437bbd8ef411106ca509c52f07be..4255114243cf5da45768d8864bc7cbe3442aed7e 100644 (file)
@@ -5081,5 +5081,7 @@ pub fn issue_14344_workaround() {} // FIXME #14344 force linkage to happen corre
 #[doc(hidden)]
 #[cfg(not(test))]
 mod std {
-    pub use core::kinds;
+    #[cfg(stage0)]
+    pub use core::markers as kinds;
+    pub use core::markers;
 }
index c4dd08f9917e2dcbc95349b9449406adf91d3934..9e900fcb3db0f233f75be8fc3f683b9f76fd5f22 100644 (file)
@@ -516,7 +516,9 @@ fn rand<R: Rng>(rng: &mut R) -> XorShiftRng {
 mod std {
     pub use core::{option, fmt}; // panic!()
     pub use core::clone; // derive Clone
-    pub use core::kinds;
+    #[cfg(stage0)]
+    pub use core::markers as kinds;
+    pub use core::markers;
 }
 
 #[cfg(test)]
index df2a4e4c2532a988616508c89bab76516f8a1c73..780e3da4684281eafc4999066a316d5ecced4fc3 100644 (file)
@@ -29,7 +29,7 @@
 use middle::ty::{MethodStatic, MethodStaticUnboxedClosure};
 use util::ppaux::Repr;
 
-use std::kinds;
+use std::markers;
 use syntax::{ast, ast_util};
 use syntax::ptr::P;
 use syntax::codemap::Span;
@@ -135,7 +135,7 @@ enum TrackMatchMode<T> {
     Conflicting,
 }
 
-impl<T> kinds::Copy for TrackMatchMode<T> {}
+impl<T> markers::Copy for TrackMatchMode<T> {}
 
 impl<T> TrackMatchMode<T> {
     // Builds up the whole match mode for a pattern from its constituent
index 73da96445934c53e51da700b17e5483b47a2cc8b..b73142b405147028ccb8d546e04921c0c7d081a9 100644 (file)
@@ -10,7 +10,7 @@
 
 pub use self::VarValue::*;
 
-use std::kinds::marker;
+use std::markers;
 
 use middle::ty::{expected_found, IntVarValue};
 use middle::ty::{self, Ty};
@@ -78,7 +78,7 @@ pub struct UnificationTable<K,V> {
 /// made during the snapshot may either be *committed* or *rolled back*.
 pub struct Snapshot<K> {
     // Link snapshot to the key type `K` of the table.
-    marker: marker::CovariantType<K>,
+    marker: markers::CovariantType<K>,
     snapshot: sv::Snapshot,
 }
 
@@ -108,7 +108,7 @@ pub fn new() -> UnificationTable<K,V> {
     /// Starts a new snapshot. Each snapshot must be either
     /// rolled back or committed in a "LIFO" (stack) order.
     pub fn snapshot(&mut self) -> Snapshot<K> {
-        Snapshot { marker: marker::CovariantType::<K>,
+        Snapshot { marker: markers::CovariantType::<K>,
                    snapshot: self.values.start_snapshot() }
     }
 
index e58c2275fcd96448c9836330cfe2bad49df4120f..62c46c435bc7ea693b7f699ac2a8dcef13bfa1b9 100644 (file)
@@ -402,8 +402,8 @@ fn visit_item(&mut self, item: &ast::Item) {
 struct ConstraintContext<'a, 'tcx: 'a> {
     terms_cx: TermsContext<'a, 'tcx>,
 
-    // These are the def-id of the std::kinds::marker::InvariantType,
-    // std::kinds::marker::InvariantLifetime, and so on. The arrays
+    // These are the def-id of the std::markers::InvariantType,
+    // std::markers::InvariantLifetime, and so on. The arrays
     // are indexed by the `ParamKind` (type, lifetime, self). Note
     // that there are no marker types for self, so the entries for
     // self are always None.
index a3fc38c34e84fb70deb3f094cfdf0f745b32e29c..ce9857f8243c803b307e2a884444e5747ca03a94 100644 (file)
@@ -21,7 +21,7 @@
 use fmt::{self, Show};
 use hash::{Hash, Hasher, RandomSipHasher};
 use iter::{self, Iterator, IteratorExt, FromIterator, Extend, Map};
-use kinds::Sized;
+use markers::Sized;
 use mem::{self, replace};
 use num::{Int, UnsignedInt};
 use ops::{Deref, FnMut, Index, IndexMut};
index 211bfe2c10e8fede558452f3c9a12918bd60054c..d67581a12b3ed0db9ddab6e903d290046b1c358b 100644 (file)
@@ -13,7 +13,7 @@
 use borrow::BorrowFrom;
 use clone::Clone;
 use cmp::{Eq, PartialEq};
-use core::kinds::Sized;
+use core::markers::Sized;
 use default::Default;
 use fmt::Show;
 use fmt;
index 1eb4408eedc403d4d4fb0e273e9bd9d52ad88eeb..cdfde1958c686a53d76a4127e174de39e8fd1625 100644 (file)
@@ -16,7 +16,7 @@
 use cmp;
 use hash::{Hash, Hasher};
 use iter::{Iterator, count};
-use kinds::{Copy, Sized, marker};
+use markers::{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:   marker::CovariantType<(K,V)>,
+    marker:   markers::CovariantType<(K,V)>,
 }
 
 struct RawBucket<K, V> {
@@ -562,7 +562,7 @@ unsafe fn new_uninitialized(capacity: uint) -> RawTable<K, V> {
                 size: 0,
                 capacity: 0,
                 hashes: Unique::null(),
-                marker: marker::CovariantType,
+                marker: markers::CovariantType,
             };
         }
         // No need for `checked_mul` before a more restrictive check performed
@@ -601,7 +601,7 @@ unsafe fn new_uninitialized(capacity: uint) -> RawTable<K, V> {
             capacity: capacity,
             size:     0,
             hashes:   Unique(hashes),
-            marker:   marker::CovariantType,
+            marker:   markers::CovariantType,
         }
     }
 
@@ -651,7 +651,7 @@ fn raw_buckets(&self) -> RawBuckets<K, V> {
             hashes_end: unsafe {
                 self.hashes.0.offset(self.capacity as int)
             },
-            marker: marker::ContravariantLifetime,
+            marker: markers::ContravariantLifetime,
         }
     }
 
@@ -676,7 +676,7 @@ pub fn into_iter(self) -> IntoIter<K, V> {
             iter: RawBuckets {
                 raw: raw,
                 hashes_end: hashes_end,
-                marker: marker::ContravariantLifetime,
+                marker: markers::ContravariantLifetime,
             },
             table: self,
         }
@@ -689,7 +689,7 @@ pub fn drain(&mut self) -> Drain<K, V> {
             iter: RawBuckets {
                 raw: raw,
                 hashes_end: hashes_end,
-                marker: marker::ContravariantLifetime::<'static>,
+                marker: markers::ContravariantLifetime::<'static>,
             },
             table: self,
         }
@@ -703,7 +703,7 @@ unsafe fn rev_move_buckets(&mut self) -> RevMoveBuckets<K, V> {
             raw: raw_bucket.offset(self.capacity as int),
             hashes_end: raw_bucket.hash,
             elems_left: self.size,
-            marker:     marker::ContravariantLifetime,
+            marker:     markers::ContravariantLifetime,
         }
     }
 }
@@ -713,7 +713,7 @@ unsafe fn rev_move_buckets(&mut self) -> RevMoveBuckets<K, V> {
 struct RawBuckets<'a, K, V> {
     raw: RawBucket<K, V>,
     hashes_end: *mut u64,
-    marker: marker::ContravariantLifetime<'a>,
+    marker: markers::ContravariantLifetime<'a>,
 }
 
 // FIXME(#19839) Remove in favor of `#[derive(Clone)]`
@@ -722,7 +722,7 @@ fn clone(&self) -> RawBuckets<'a, K, V> {
         RawBuckets {
             raw: self.raw,
             hashes_end: self.hashes_end,
-            marker: marker::ContravariantLifetime,
+            marker: markers::ContravariantLifetime,
         }
     }
 }
@@ -754,7 +754,7 @@ struct RevMoveBuckets<'a, K, V> {
     raw: RawBucket<K, V>,
     hashes_end: *mut u64,
     elems_left: uint,
-    marker: marker::ContravariantLifetime<'a>,
+    marker: markers::ContravariantLifetime<'a>,
 }
 
 impl<'a, K, V> Iterator for RevMoveBuckets<'a, K, V> {
index ac2b01e995e2c62b5b17cea4e589659149bff133..34facdc7de654d0e9c337c661f19fbc3d18056ff 100644 (file)
@@ -63,7 +63,7 @@
 
 pub use core::hash::{Hash, Hasher, Writer, hash, sip};
 
-use core::kinds::Sized;
+use core::markers::Sized;
 use default::Default;
 use rand::Rng;
 use rand;
index 5bef473db990c8879a7fcb23d801ad6a88321769..deae56d8a30d36d10ded7759ef5604529d73aba5 100644 (file)
 use fmt;
 use int;
 use iter::{Iterator, IteratorExt};
-use kinds::Sized;
+use markers::Sized;
 use mem::transmute;
 use ops::FnOnce;
 use option::Option;
index f571bed3ba2264c58893bd7a1db5ef9207ae8ebd..43d37543e16a7f4b916ccea52f596d05819c8d55 100644 (file)
@@ -34,7 +34,7 @@
 use fmt;
 use io::{Reader, Writer, IoResult, IoError, OtherIoError, Buffer,
          standard_error, EndOfFile, LineBufferedWriter, BufferedReader};
-use kinds::{Sync, Send};
+use markers::{Sync, Send};
 use libc;
 use mem;
 use option::Option;
index b9f226c5aca73e83a227f4fc81b1116bc4cf5a0d..b258c13f12e32fe37cb9618b3f4583f62969b1fd 100644 (file)
@@ -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.
 //!
 
 // 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::markers;
 #[cfg(test)] pub use realstd::ops;
 #[cfg(test)] pub use realstd::cmp;
 #[cfg(test)] pub use realstd::boxed;
 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::markers as kinds;
+#[cfg(not(test))] pub use core::markers;
 pub use core::mem;
 #[cfg(not(test))] pub use core::ops;
 pub use core::ptr;
@@ -311,7 +312,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 markers as kinds;
+    pub use markers;  // used for tls!
     pub use ops; // used for bitflags!
 
     // The test runner calls ::std::os::args() but really wants realstd
index e3402984ae5053a98bf6028ea46e1e4a67d46f69..cd78489cb85137aeb457f1a2370838839956fac3 100644 (file)
@@ -19,7 +19,7 @@
 #[cfg(test)] use fmt::Show;
 use ops::{Add, Sub, Mul, Div, Rem, Neg};
 
-use kinds::Copy;
+use markers::Copy;
 use clone::Clone;
 use cmp::{PartialOrd, PartialEq};
 
index 300ceec4b45bf3a047a54a0947a29395cd8accc3..0e41d608086e9b9424fc0c48d1ab8fa2469c993c 100644 (file)
@@ -37,7 +37,7 @@
 use fmt;
 use io::{IoResult, IoError};
 use iter::{Iterator, IteratorExt};
-use kinds::Copy;
+use markers::Copy;
 use libc::{c_void, c_int, c_char};
 use libc;
 use boxed::Box;
index b020164158cff2d5d2e876b58403cc3016b7d244..e263761acd1c7df2784f8cf02491322757344b60 100644 (file)
@@ -61,7 +61,7 @@
 
 #![experimental]
 
-use core::kinds::Sized;
+use core::markers::Sized;
 use ffi::CString;
 use clone::Clone;
 use fmt;
index d9981ace0301ec52b40ae8453951b392fe99df2d..03811364d30c2b0275ce7d256fc0a41b6b2effd9 100644 (file)
@@ -16,7 +16,7 @@
 use io::Writer;
 use iter::{AdditiveIterator, Extend};
 use iter::{Iterator, IteratorExt, Map};
-use kinds::Sized;
+use markers::Sized;
 use option::Option::{self, Some, None};
 use slice::{AsSlice, Split, SliceExt, SliceConcatExt};
 use str::{self, FromStr, StrExt};
index 9e9a483e1a5e3f510922eb6ae9b652eda2848162..bf8d2a3d63b9cbf02b7d0450fb7fb164a1a94327 100644 (file)
@@ -13,7 +13,7 @@
 #![stable]
 
 // Reexported core operators
-#[stable] #[doc(no_inline)] pub use kinds::{Copy, Send, Sized, Sync};
+#[stable] #[doc(no_inline)] pub use markers::{Copy, Send, Sized, Sync};
 #[stable] #[doc(no_inline)] pub use ops::{Drop, Fn, FnMut, FnOnce};
 
 // Reexported functions
index a79a6e35ebcfd377ff74265cba1a9ec9d842d149..512bd2a3d6e9b024e3fba7371b39cdef2a2c1ef3 100644 (file)
@@ -185,7 +185,7 @@ mod imp {
     extern crate libc;
 
     use io::{IoResult};
-    use kinds::Sync;
+    use markers::Sync;
     use mem;
     use os;
     use rand::Rng;
index e556888a470a288b100364bf8fd29aaae1ae94bf..036bb7b637b679869ca37432f5af5a10eb332a8c 100644 (file)
@@ -23,7 +23,7 @@
 
 #![allow(dead_code)]
 
-use kinds::Send;
+use markers::Send;
 use ops::FnOnce;
 use sys;
 use thunk::Thunk;
index faff5f09f81e118c2928585f94654a8471842427..af6aa803f99695bd9ecc3742d36abb73fc375215 100644 (file)
@@ -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 markers::{Sync, Send};
+use markers::{NoSend, NoSync};
 use mem;
 use clone::Clone;
 
index 7c18b8a43faad827cbff96a4f577e61d2b8fc19a..4d18d9e6e9d674879ea853745e320dcf952eee53 100644 (file)
 
 use sync::Arc;
 use fmt;
-use kinds::marker;
+use markers;
 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: marker::NoSync,
+    _marker: markers::NoSync,
 }
 
 /// An error returned from the `send` function on channels.
@@ -678,7 +678,7 @@ fn drop(&mut self) {
 
 impl<T: Send> SyncSender<T> {
     fn new(inner: Arc<RacyCell<sync::Packet<T>>>) -> SyncSender<T> {
-        SyncSender { inner: inner, _marker: marker::NoSync }
+        SyncSender { inner: inner, _marker: markers::NoSync }
     }
 
     /// Sends a value on this synchronous channel.
index 16adbf5aa4f69a24f6905ddeec193aa676b6feec..ca7120b5ead8f0163728824365cde629d06a337a 100644 (file)
@@ -57,7 +57,7 @@
 use core::prelude::*;
 
 use core::cell::Cell;
-use core::kinds::marker;
+use core::markers;
 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: marker::NoSend,
+    marker1: markers::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: marker::NoSend,
+            marker1: markers::NoSend,
             head: 0 as *mut Handle<'static, ()>,
             tail: 0 as *mut Handle<'static, ()>,
             next_id: Cell::new(1),
index 6b3dd89f33b07fcc71cc4a4a02cdfd7c4072ec2a..bb5a633764690855af810152c5198bc88f6c2ff0 100644 (file)
@@ -11,7 +11,7 @@
 use prelude::v1::*;
 
 use cell::UnsafeCell;
-use kinds::marker;
+use markers;
 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: marker::NoSend,
+    __marker: markers::NoSend,
 }
 
 /// Static initialization of a mutex. This constant can be used to initialize
@@ -286,7 +286,7 @@ fn new(lock: &'mutex StaticMutex, data: &'mutex UnsafeCell<T>)
                 __lock: lock,
                 __data: data,
                 __poison: guard,
-                __marker: marker::NoSend,
+                __marker: markers::NoSend,
             }
         })
     }
index aa2d957a3eb5e14bb3268b2e539fcc51e31ff939..11a5cad2c25f117936acce252fc81286824fba08 100644 (file)
@@ -14,7 +14,7 @@
 //! example use case would be for initializing an FFI library.
 
 use int;
-use kinds::Sync;
+use markers::Sync;
 use mem::drop;
 use ops::FnOnce;
 use sync::atomic::{AtomicInt, Ordering, ATOMIC_INT_INIT};
index 4afd5bb63f4fec79c368880afcd2b433d23d0d48..f40c0cc0c0e53fbf113731ee955741a84f663657 100644 (file)
@@ -11,7 +11,7 @@
 use prelude::v1::*;
 
 use cell::UnsafeCell;
-use kinds::marker;
+use markers;
 use ops::{Deref, DerefMut};
 use sync::poison::{self, LockResult, TryLockError, TryLockResult};
 use sys_common::rwlock as sys;
@@ -113,7 +113,7 @@ unsafe impl Sync for StaticRwLock {}
 pub struct RwLockReadGuard<'a, T: 'a> {
     __lock: &'a StaticRwLock,
     __data: &'a UnsafeCell<T>,
-    __marker: marker::NoSend,
+    __marker: markers::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: marker::NoSend,
+    __marker: markers::NoSend,
 }
 
 impl<T: Send + Sync> RwLock<T> {
@@ -309,7 +309,7 @@ fn new(lock: &'rwlock StaticRwLock, data: &'rwlock UnsafeCell<T>)
             RwLockReadGuard {
                 __lock: lock,
                 __data: data,
-                __marker: marker::NoSend,
+                __marker: markers::NoSend,
             }
         })
     }
@@ -322,7 +322,7 @@ fn new(lock: &'rwlock StaticRwLock, data: &'rwlock UnsafeCell<T>)
                 __lock: lock,
                 __data: data,
                 __poison: guard,
-                __marker: marker::NoSend,
+                __marker: markers::NoSend,
             }
         })
     }
index 567c26956efe94f6c3a1e62d440b7e75b9d46035..b86e6ce254a535b2dc27af80c6085e33d017ee01 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use kinds::Sync;
+use markers::Sync;
 use sys::mutex as imp;
 
 /// An OS-based mutual exclusion lock.
index ca419d1c7f436044f90c5dd2a1c17787c5db2f39..968347bbfbcb1504d4ce7162d90c44a24ad555dd 100644 (file)
@@ -165,8 +165,8 @@ pub struct sigaction {
         sa_restorer: *mut libc::c_void,
     }
 
-    unsafe impl ::kinds::Send for sigaction { }
-    unsafe impl ::kinds::Sync for sigaction { }
+    unsafe impl ::markers::Send for sigaction { }
+    unsafe impl ::markers::Sync for sigaction { }
 
     #[repr(C)]
     #[cfg(target_word_size = "32")]
@@ -217,8 +217,8 @@ pub struct sigaction {
         sa_resv: [libc::c_int; 1],
     }
 
-    unsafe impl ::kinds::Send for sigaction { }
-    unsafe impl ::kinds::Sync for sigaction { }
+    unsafe impl ::markers::Send for sigaction { }
+    unsafe impl ::markers::Sync for sigaction { }
 
     #[repr(C)]
     pub struct sigset_t {
index 81f8659d6ae08b87c79c247655ab1c68a668a1ba..8da25c7880dfd4c058406cf68e2b4f9f4d2f1dfb 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use cell::UnsafeCell;
-use kinds::Sync;
+use markers::Sync;
 use sys::sync as ffi;
 use sys_common::mutex;
 
index cc82d38ae2af1f01140701dd4e6894296fc594d6..630087e2291a52fe43fc1fb12c61d6a933396f65 100644 (file)
 use boxed::Box;
 use cell::UnsafeCell;
 use clone::Clone;
-use kinds::{Send, Sync};
+use markers::{Send, Sync};
 use ops::{Drop, FnOnce};
 use option::Option::{self, Some, None};
 use result::Result::{Err, Ok};
index e0cbaa8ca50edbbb99c63a147445d1951f8551a7..bf01b578b1fb797eda50c6f13e13864e99619674 100644 (file)
@@ -346,7 +346,7 @@ pub struct Key<T> {
         pub dtor_running: UnsafeCell<bool>, // should be Cell
     }
 
-    unsafe impl<T> ::kinds::Sync for Key<T> { }
+    unsafe impl<T> ::markers::Sync for Key<T> { }
 
     #[doc(hidden)]
     impl<T> Key<T> {
@@ -472,7 +472,7 @@ pub struct Key<T> {
         pub os: OsStaticKey,
     }
 
-    unsafe impl<T> ::kinds::Sync for Key<T> { }
+    unsafe impl<T> ::markers::Sync for Key<T> { }
 
     struct Value<T: 'static> {
         key: &'static Key<T>,
index 714b71d5dbd4e75364c4ee165a32dc8b8eafc10b..a643d2cb8ee36e9cf724e4d27153faa6872cf279 100644 (file)
@@ -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::markers::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> ::markers::Sync for KeyInner<T> { }
 
     #[doc(hidden)]
     impl<T> KeyInner<T> {
@@ -224,16 +224,16 @@ pub unsafe fn get(&self) -> *mut T { *self.inner.get() }
 
 #[cfg(any(windows, target_os = "android", target_os = "ios", target_arch = "aarch64"))]
 mod imp {
-    use kinds::marker;
+    use markers;
     use sys_common::thread_local::StaticKey as OsStaticKey;
 
     #[doc(hidden)]
     pub struct KeyInner<T> {
         pub inner: OsStaticKey,
-        pub marker: marker::InvariantType<T>,
+        pub marker: markers::InvariantType<T>,
     }
 
-    unsafe impl<T> ::kinds::Sync for KeyInner<T> { }
+    unsafe impl<T> ::markers::Sync for KeyInner<T> { }
 
     #[doc(hidden)]
     impl<T> KeyInner<T> {
index 067926042f121ba38c6c77e30ba3d449a9638323..ec9dd86f941076cca4b80d96cefd1cda2a2afc63 100644 (file)
@@ -12,7 +12,7 @@
 #![allow(missing_docs)]
 
 use alloc::boxed::Box;
-use core::kinds::Send;
+use core::markers::Send;
 use core::ops::FnOnce;
 
 pub struct Thunk<A=(),R=()> {
index cf29bb048d6445b4f98bdc67b80aee7d9cac9094..50c91c133437d6569f493f9bbf08cbc74896a958 100644 (file)
@@ -47,7 +47,7 @@ pub fn expand_deriving_bound<F>(cx: &mut ExtCtxt,
     let trait_def = TraitDef {
         span: span,
         attributes: Vec::new(),
-        path: Path::new(vec!("std", "kinds", name)),
+        path: Path::new(vec!("std", "markers", name)),
         additional_bounds: Vec::new(),
         generics: LifetimeBounds::empty(),
         methods: vec!()
index c755ea93184028fb9f068c2a0b83a902ddbd1752..094d45a10d166ce235f04bd913e5dc92533099bf 100644 (file)
@@ -7801,7 +7801,7 @@ pub fn width(c: char, is_cjk: bool) -> Option<uint> {
 }
 
 pub mod grapheme {
-    use core::kinds::Copy;
+    use core::markers::Copy;
     use core::slice::SliceExt;
     pub use self::GraphemeCat::*;
     use core::result::Result::{Ok, Err};
index db39eafc1912bb5064679d2af3ec8fecb5a8b4cc..28483abda3cfe5a0f0c153c06e0890272c487d4b 100644 (file)
@@ -14,7 +14,7 @@ trait Get {
 }
 
 fn foo<T:Get>(t: T) {
-    let x = t.get(); //~ ERROR the trait `core::kinds::Sized` is not implemented
+    let x = t.get(); //~ ERROR the trait `core::markers::Sized` is not implemented
 }
 
 fn main() {
index cf07dc02b9609cf509788b23042e05d077fd70e8..33907dc4c4667a04c71e6bb017056d84ba2f49a6 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 fn foo<T:'static>() {
-    1u.bar::<T>(); //~ ERROR `core::kinds::Send` is not implemented
+    1u.bar::<T>(); //~ ERROR `core::markers::Send` is not implemented
 }
 
 trait bar {
index 4e0ad8088bee47c6d3fda00c68b4cbbbb29551db..6e8fcba8c8a15fbe36c2b517234a989e0dc67860 100644 (file)
@@ -16,8 +16,8 @@ trait Trait {}
 
 pub fn main() {
     let x: Vec<Trait + Sized> = Vec::new();
-    //~^ ERROR the trait `core::kinds::Sized` is not implemented
-    //~^^ ERROR the trait `core::kinds::Sized` is not implemented
+    //~^ ERROR the trait `core::markers::Sized` is not implemented
+    //~^^ ERROR the trait `core::markers::Sized` is not implemented
     let x: Vec<Box<RefCell<Trait + Sized>>> = Vec::new();
-    //~^ ERROR the trait `core::kinds::Sized` is not implemented
+    //~^ ERROR the trait `core::markers::Sized` is not implemented
 }
index ea36c76ea40580d161a7117c9add3b141e99cb5b..310da28dd4963757c47d91f57f379347c22be9e7 100644 (file)
 
 // Ensure that moves out of static items is forbidden
 
-use std::kinds::marker;
+use std::markers;
 
 struct Foo {
     foo: int,
-    nocopy: marker::NoCopy
+    nocopy: markers::NoCopy
 }
 
-static BAR: Foo = Foo{foo: 5, nocopy: marker::NoCopy};
+static BAR: Foo = Foo{foo: 5, nocopy: markers::NoCopy};
 
 
 fn test(f: Foo) {
index 23cd4d80724e0c5523b25cf3cf763b6af56c51ca..36d430ddeaa630569631628307b722c0141d9537 100644 (file)
@@ -12,7 +12,7 @@
 // move, when the struct implements Drop.
 
 // NoCopy
-use std::kinds::marker::NoCopy as NP;
+use std::markers::NoCopy as NP;
 
 
 struct S { a: int, np: NP }
index f3b9c395e45145206dea3aecc332e1da1f4b9d3f..03c1aa2a05d683fbbbb5a07b5e477e056f516327 100644 (file)
@@ -13,9 +13,9 @@
 
 trait Foo : Send+Sync { }
 
-impl <T: Sync+'static> Foo for (T,) { } //~ ERROR the trait `core::kinds::Send` is not implemented
+impl <T: Sync+'static> Foo for (T,) { } //~ ERROR the trait `core::markers::Send` is not implemented
 
-impl <T: Send> Foo for (T,T) { } //~ ERROR the trait `core::kinds::Sync` is not implemented
+impl <T: Send> Foo for (T,T) { } //~ ERROR the trait `core::markers::Sync` is not implemented
 
 impl <T: Send+Sync> Foo for (T,T,T) { } // (ok)
 
index 76835c9955f6ea6af3ae2cf6d035414daee7e4da..1fa663640d869d931b9e0acd1592159a87b5f2b6 100644 (file)
@@ -22,6 +22,6 @@
 impl <T:Sync> RequiresShare for X<T> { }
 
 impl <T:Sync+'static> RequiresRequiresShareAndSend for X<T> { }
-//~^ ERROR the trait `core::kinds::Send` is not implemented
+//~^ ERROR the trait `core::markers::Send` is not implemented
 
 fn main() { }
index e77177f7f6d296ad68929b9498913dedcef45bb2..2c295768e7ad50187378d2ea0ff532e826092f86 100644 (file)
@@ -12,6 +12,6 @@
 
 trait Foo : Send { }
 
-impl <T: Sync+'static> Foo for T { } //~ ERROR the trait `core::kinds::Send` is not implemented
+impl <T: Sync+'static> Foo for T { } //~ ERROR the trait `core::markers::Send` is not implemented
 
 fn main() { }
index 54dccebe69953dc720a7780766763c0bfd0ed3b0..8b7d2457d3cdc10787bab93b257dd317c3cef456 100644 (file)
@@ -10,7 +10,7 @@
 
 // Verifies all possible restrictions for statics values.
 
-use std::kinds::marker;
+use std::markers;
 
 struct WithDtor;
 
index 2e535b3950938cbb2bdbf7e51ed303075d2d651b..5dce6ba81333b054ce8724bb29912bdf5e104eda 100644 (file)
@@ -13,5 +13,5 @@
 fn test<T: Sync>() {}
 
 fn main() {
-    test::<Receiver<int>>();   //~ ERROR: `core::kinds::Sync` is not implemented
+    test::<Receiver<int>>();   //~ ERROR: `core::markers::Sync` is not implemented
 }
index 1b1c43e4793e339c42a7a623c3a93d201a398e3b..0f34ccf4a523a4fa5abd45011edab599e5c80e1d 100644 (file)
@@ -13,5 +13,5 @@
 fn test<T: Sync>() {}
 
 fn main() {
-    test::<Sender<int>>();     //~ ERROR: `core::kinds::Sync` is not implemented
+    test::<Sender<int>>();     //~ ERROR: `core::markers::Sync` is not implemented
 }
index 5e360b6ab9bad8fa2d4e40dd5fbdc022bc7ee17b..b9c06c60a5dcbe1c22d8b9dc6ed9e2f3e4cef3fb 100644 (file)
@@ -43,5 +43,5 @@ pub fn main() {
     let f5: &mut Fat<ToBar> = &mut Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
     let z: Box<ToBar> = box Bar1 {f: 36};
     f5.ptr = *z;
-    //~^ ERROR the trait `core::kinds::Sized` is not implemented
+    //~^ ERROR the trait `core::markers::Sized` is not implemented
 }
index cc709be99002ea2a35ca44d04f6c9823409a30fd..2516d9874550ffe86308a688b155cef30d254f18 100644 (file)
@@ -43,5 +43,5 @@ pub fn main() {
     let f5: &mut Fat<ToBar> = &mut Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
     let z: Box<ToBar> = box Bar1 {f: 36};
     f5.ptr = Bar1 {f: 36}; //~ ERROR mismatched types: expected `ToBar`, found `Bar1`
-    //~^ ERROR the trait `core::kinds::Sized` is not implemented for the type `ToBar`
+    //~^ ERROR the trait `core::markers::Sized` is not implemented for the type `ToBar`
 }
index b169824cb3aca2e40a44473aca31a23bee64e319..ed2ccc9d9cc4254443479c496bb3392f1d5b1e94 100644 (file)
@@ -21,5 +21,5 @@ pub fn main() {
     let f: Fat<[int; 3]> = Fat { ptr: [5i, 6, 7] };
     let g: &Fat<[int]> = &f;
     let h: &Fat<Fat<[int]>> = &Fat { ptr: *g };
-    //~^ ERROR the trait `core::kinds::Sized` is not implemented
+    //~^ ERROR the trait `core::markers::Sized` is not implemented
 }
index 3c75b5b6eddb8b77cacbd767680f76ddb01c546b..b28952d2b330e2654b69c6552fc3cf568e54a7d0 100644 (file)
@@ -15,22 +15,22 @@ impl Foo for str {}
 
 fn test1<T: ?Sized + Foo>(t: &T) {
     let u: &Foo = t;
-    //~^ ERROR `core::kinds::Sized` is not implemented for the type `T`
+    //~^ ERROR `core::markers::Sized` is not implemented for the type `T`
 }
 
 fn test2<T: ?Sized + Foo>(t: &T) {
     let v: &Foo = t as &Foo;
-    //~^ ERROR `core::kinds::Sized` is not implemented for the type `T`
+    //~^ ERROR `core::markers::Sized` is not implemented for the type `T`
 }
 
 fn test3() {
     let _: &[&Foo] = &["hi"];
-    //~^ ERROR `core::kinds::Sized` is not implemented for the type `str`
+    //~^ ERROR `core::markers::Sized` is not implemented for the type `str`
 }
 
 fn test4() {
     let _: &Foo = "hi" as &Foo;
-    //~^ ERROR `core::kinds::Sized` is not implemented for the type `str`
+    //~^ ERROR `core::markers::Sized` is not implemented for the type `str`
 }
 
 fn main() { }
index ea5becbf229c0e0aca0c1602e6e953783ac0b467..af0b780b3b779e1f4a5382d9c81c1c56383f6fd5 100644 (file)
@@ -15,9 +15,9 @@
 trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
 
 impl Foo<[int]> for uint { }
-//~^ ERROR the trait `core::kinds::Sized` is not implemented for the type `[int]`
+//~^ ERROR the trait `core::markers::Sized` is not implemented for the type `[int]`
 
 impl Foo<int> for [uint] { }
-//~^ ERROR the trait `core::kinds::Sized` is not implemented for the type `[uint]`
+//~^ ERROR the trait `core::markers::Sized` is not implemented for the type `[uint]`
 
 pub fn main() { }
index 3d25c7ee772f626f95963eb35bf63d26d7003355..581a06db7451aad818765b24aaa6e5076dcd1bc5 100644 (file)
@@ -13,5 +13,5 @@
 fn check_bound<T:Copy>(_: T) {}
 
 fn main() {
-    check_bound("nocopy".to_string()); //~ ERROR the trait `core::kinds::Copy` is not implemented
+    check_bound("nocopy".to_string()); //~ ERROR the trait `core::markers::Copy` is not implemented
 }
index d03885ca7133c57609af0bbb094a4baaa4c37525..d9b8c4db031d087894f9fea5a4f4af7ef2db0e3f 100644 (file)
@@ -10,5 +10,5 @@
 
 fn main() {
     let _x = "test" as &::std::any::Any;
-//~^ ERROR the trait `core::kinds::Sized` is not implemented for the type `str`
+//~^ ERROR the trait `core::markers::Sized` is not implemented for the type `str`
 }
index 5be3b960ec635711d09cdff1ecb2623836257376..5e305313fcf9bf289964154656c9de7aca349eba 100644 (file)
@@ -15,7 +15,7 @@ fn dft_iter<'a, T>(arg1: Chunks<'a,T>, arg2: ChunksMut<'a,T>)
 {
     for
     &something
-//~^ ERROR the trait `core::kinds::Sized` is not implemented for the type `[T]`
+//~^ ERROR the trait `core::markers::Sized` is not implemented for the type `[T]`
     in arg2
     {
     }
index 0e022834bacf2fae3bd8103b25199791ee4aeec2..505a59b484db82dbeba741e45595b18ce69081d3 100644 (file)
@@ -20,6 +20,6 @@ fn foo(value: *const X) -> *const X {
 
 static foo: *const Y::X = Y::foo(Y::x as *const Y::X);
 //~^ ERROR cannot refer to other statics by value
-//~| ERROR: the trait `core::kinds::Sync` is not implemented for the type
+//~| ERROR: the trait `core::markers::Sync` is not implemented for the type
 
 fn main() {}
index c57df9a3af4a4f88392a6f739f55f689f42fb954..730344f5763ccda985593ee1f517b965d848b797 100644 (file)
@@ -8,10 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::kinds::marker;
+use std::markers;
 
-struct Foo { nc: marker::NoCopy }
-const INIT: Foo = Foo { nc: marker::NoCopy };
+struct Foo { nc: markers::NoCopy }
+const INIT: Foo = Foo { nc: markers::NoCopy };
 static FOO: Foo = INIT;
 
 fn main() {
index 63a40e2374b15cbee042b0f1123a6e9e2c5d6771..da343cc81ac668a7f5b080aa54684df48bf26696 100644 (file)
@@ -8,12 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::kinds::marker;
+use std::markers;
 
-struct Foo { marker: marker::NoSync }
+struct Foo { marker: markers::NoSync }
 
 static FOO: uint = 3;
-static BAR: Foo = Foo { marker: marker::NoSync };
-//~^ ERROR: the trait `core::kinds::Sync` is not implemented
+static BAR: Foo = Foo { marker: markers::NoSync };
+//~^ ERROR: the trait `core::markers::Sync` is not implemented
 
 fn main() {}
index 6cebf7f9da14d94a219d6293a8fd79bf9432dac8..a17b2ee0c68a215439975591663f9c88e1fbc62e 100644 (file)
@@ -14,7 +14,7 @@ pub trait AbstractRenderer {}
 
 fn _create_render(_: &()) ->
     AbstractRenderer
-//~^ ERROR: the trait `core::kinds::Sized` is not implemented
+//~^ ERROR: the trait `core::markers::Sized` is not implemented
 {
     match 0u {
         _ => unimplemented!()
index 70fe6b9b6a868acac98a548e29fd31dcb6b60a48..b9fbc37828f6b32e15039ca610119ff082f0e976 100644 (file)
@@ -18,13 +18,13 @@ trait To {
     // This is a typo, the return type should be `<Dst as From<Self>>::Output`
     fn to<Dst: From<Self>>(
         self
-        //~^ error: the trait `core::kinds::Sized` is not implemented
+        //~^ error: the trait `core::markers::Sized` is not implemented
     ) ->
         <Dst as From<Self>>::Dst
-        //~^ error: the trait `core::kinds::Sized` is not implemented
+        //~^ error: the trait `core::markers::Sized` is not implemented
     {
         From::from(
-            //~^ error: the trait `core::kinds::Sized` is not implemented
+            //~^ error: the trait `core::markers::Sized` is not implemented
             self
         )
     }
index b52f2b1b13857231b830f69492590d09114311eb..8076df39db9a40a558cea4493015811ba46eadba 100644 (file)
@@ -16,9 +16,9 @@ trait From<Src> {
 
 trait To {
     fn to<Dst>(
-        self //~ error: the trait `core::kinds::Sized` is not implemented
+        self //~ error: the trait `core::markers::Sized` is not implemented
     ) -> <Dst as From<Self>>::Result where Dst: From<Self> {
-        From::from( //~ error: the trait `core::kinds::Sized` is not implemented
+        From::from( //~ error: the trait `core::markers::Sized` is not implemented
             self
         )
     }
index 981abf6cc23d8867cd58ba26874d85926034cee9..da60fee65c6ab6db758ecd18df7e584b1302d0f1 100644 (file)
@@ -17,6 +17,6 @@ struct S {
     name: int
 }
 
-fn bar(_x: Foo) {} //~ ERROR the trait `core::kinds::Sized` is not implemented
+fn bar(_x: Foo) {} //~ ERROR the trait `core::markers::Sized` is not implemented
 
 fn main() {}
index d0830ff8e4d76efda060130a8ebed5ff539128ce..05073927beb62899783a821d1fad5174d556f6b4 100644 (file)
@@ -11,6 +11,6 @@
 trait I {}
 type K = I+'static;
 
-fn foo(_x: K) {} //~ ERROR: the trait `core::kinds::Sized` is not implemented
+fn foo(_x: K) {} //~ ERROR: the trait `core::markers::Sized` is not implemented
 
 fn main() {}
index f970cdb1b8304c6b797ae3f3333ea231d9331470..6981c4451ca13819892b021528d298e869c06670 100644 (file)
@@ -14,5 +14,5 @@ impl Foo for u8 {}
 fn main() {
     let r: Box<Foo> = box 5;
     let _m: Box<Foo> = r as Box<Foo>;
-    //~^ ERROR `core::kinds::Sized` is not implemented for the type `Foo`
+    //~^ ERROR `core::markers::Sized` is not implemented for the type `Foo`
 }
index e6ac30139c37fba489a4bf4c19708529db799cc2..2f601a8ba58bbda26fbaf57baab11260a2d8236f 100644 (file)
@@ -15,8 +15,8 @@ struct Struct {
 }
 
 fn new_struct(r: A+'static)
-    -> Struct { //~^  ERROR the trait `core::kinds::Sized` is not implemented
-    //~^ ERROR the trait `core::kinds::Sized` is not implemented
+    -> Struct { //~^  ERROR the trait `core::markers::Sized` is not implemented
+    //~^ ERROR the trait `core::markers::Sized` is not implemented
     Struct { r: r }
 }
 
index a8a699d62d5eed33c6d8dccab6ba671b0caefe44..30a59c52faa8cfbdf8cb368e537e96704d538e2b 100644 (file)
@@ -32,6 +32,6 @@ struct A {
 
 fn main() {
     let a = A {v: box B{v: None} as Box<Foo+Send>};
-    //~^ ERROR the trait `core::kinds::Send` is not implemented
-    //~^^ ERROR the trait `core::kinds::Send` is not implemented
+    //~^ ERROR the trait `core::markers::Send` is not implemented
+    //~^^ ERROR the trait `core::markers::Send` is not implemented
 }
index 77836143f27dd8824c8d91c7831d44f8d3b7cb64..c4217029a9343886379af44eba9ee73fc0798b44 100644 (file)
@@ -14,7 +14,7 @@
 // Regresion test for issue 7364
 static boxed: Box<RefCell<int>> = box RefCell::new(0);
 //~^ ERROR statics are not allowed to have custom pointers
-//~| ERROR: the trait `core::kinds::Sync` is not implemented for the type
-//~| ERROR: the trait `core::kinds::Sync` is not implemented for the type
+//~| ERROR: the trait `core::markers::Sync` is not implemented for the type
+//~| ERROR: the trait `core::markers::Sync` is not implemented for the type
 
 fn main() { }
index b5725249812f6ccd2edfb018b5d3fddbe9d62ded..583fbedfcbc519320bdd6e03444dbf86ecedcfbf 100644 (file)
@@ -36,14 +36,14 @@ fn test<'a,T,U:Copy>(_: &'a int) {
     assert_copy::<&'a [int]>();
 
     // ...unless they are mutable
-    assert_copy::<&'static mut int>(); //~ ERROR `core::kinds::Copy` is not implemented
-    assert_copy::<&'a mut int>();  //~ ERROR `core::kinds::Copy` is not implemented
+    assert_copy::<&'static mut int>(); //~ ERROR `core::markers::Copy` is not implemented
+    assert_copy::<&'a mut int>();  //~ ERROR `core::markers::Copy` is not implemented
 
     // ~ pointers are not ok
-    assert_copy::<Box<int>>();   //~ ERROR `core::kinds::Copy` is not implemented
-    assert_copy::<String>();   //~ ERROR `core::kinds::Copy` is not implemented
-    assert_copy::<Vec<int> >(); //~ ERROR `core::kinds::Copy` is not implemented
-    assert_copy::<Box<&'a mut int>>(); //~ ERROR `core::kinds::Copy` is not implemented
+    assert_copy::<Box<int>>();   //~ ERROR `core::markers::Copy` is not implemented
+    assert_copy::<String>();   //~ ERROR `core::markers::Copy` is not implemented
+    assert_copy::<Vec<int> >(); //~ ERROR `core::markers::Copy` is not implemented
+    assert_copy::<Box<&'a mut int>>(); //~ ERROR `core::markers::Copy` is not implemented
 
     // borrowed object types are generally ok
     assert_copy::<&'a Dummy>();
@@ -51,11 +51,11 @@ fn test<'a,T,U:Copy>(_: &'a int) {
     assert_copy::<&'static (Dummy+Copy)>();
 
     // owned object types are not ok
-    assert_copy::<Box<Dummy>>(); //~ ERROR `core::kinds::Copy` is not implemented
-    assert_copy::<Box<Dummy+Copy>>(); //~ ERROR `core::kinds::Copy` is not implemented
+    assert_copy::<Box<Dummy>>(); //~ ERROR `core::markers::Copy` is not implemented
+    assert_copy::<Box<Dummy+Copy>>(); //~ ERROR `core::markers::Copy` is not implemented
 
     // mutable object types are not ok
-    assert_copy::<&'a mut (Dummy+Copy)>();  //~ ERROR `core::kinds::Copy` is not implemented
+    assert_copy::<&'a mut (Dummy+Copy)>();  //~ ERROR `core::markers::Copy` is not implemented
 
     // unsafe ptrs are ok
     assert_copy::<*const int>();
@@ -73,10 +73,10 @@ fn test<'a,T,U:Copy>(_: &'a int) {
     assert_copy::<MyStruct>();
 
     // structs containing non-POD are not ok
-    assert_copy::<MyNoncopyStruct>(); //~ ERROR `core::kinds::Copy` is not implemented
+    assert_copy::<MyNoncopyStruct>(); //~ ERROR `core::markers::Copy` is not implemented
 
     // ref counted types are not ok
-    assert_copy::<Rc<int>>();   //~ ERROR `core::kinds::Copy` is not implemented
+    assert_copy::<Rc<int>>();   //~ ERROR `core::markers::Copy` is not implemented
 }
 
 pub fn main() {
index 6b25289567b27157a8042a0271222ad1fcf64e06..2ec22ceb63fd7430fee7f029e18e9b968c59b6c9 100644 (file)
@@ -19,5 +19,5 @@ fn take_param<T:Foo>(foo: &T) { }
 fn main() {
     let x = box 3i;
     take_param(&x);
-    //~^ ERROR the trait `core::kinds::Copy` is not implemented
+    //~^ ERROR the trait `core::markers::Copy` is not implemented
 }
index 57ee4cf7cc3b03b7695db104745be532c6103293..ad62fd9856050aecb05a17ef20b9496ee424f5af 100644 (file)
@@ -20,15 +20,15 @@ impl<T: Send + Copy> Gettable<T> for S<T> {}
 fn f<T>(val: T) {
     let t: S<T> = S;
     let a = &t as &Gettable<T>;
-    //~^ ERROR the trait `core::kinds::Send` is not implemented
-    //~^^ ERROR the trait `core::kinds::Copy` is not implemented
+    //~^ ERROR the trait `core::markers::Send` is not implemented
+    //~^^ ERROR the trait `core::markers::Copy` is not implemented
 }
 
 fn g<T>(val: T) {
     let t: S<T> = S;
     let a: &Gettable<T> = &t;
-    //~^ ERROR the trait `core::kinds::Send` is not implemented
-    //~^^ ERROR the trait `core::kinds::Copy` is not implemented
+    //~^ ERROR the trait `core::markers::Send` is not implemented
+    //~^^ ERROR the trait `core::markers::Copy` is not implemented
 }
 
 fn foo<'a>() {
@@ -40,13 +40,13 @@ fn foo<'a>() {
 fn foo2<'a>() {
     let t: Box<S<String>> = box S;
     let a = t as Box<Gettable<String>>;
-    //~^ ERROR the trait `core::kinds::Copy` is not implemented
+    //~^ ERROR the trait `core::markers::Copy` is not implemented
 }
 
 fn foo3<'a>() {
     let t: Box<S<String>> = box S;
     let a: Box<Gettable<String>> = t;
-    //~^ ERROR the trait `core::kinds::Copy` is not implemented
+    //~^ ERROR the trait `core::markers::Copy` is not implemented
 }
 
 fn main() { }
index d66fd0d77d6a9b6a6ef645a64e1ca8b7cbcf351b..238f495187c5ee2f2b8e6338aae1f3927adb7022 100644 (file)
@@ -22,13 +22,13 @@ fn take_param<T:Foo>(foo: &T) { }
 
 fn a() {
     let x = box 3i;
-    take_param(&x); //~ ERROR `core::kinds::Copy` is not implemented
+    take_param(&x); //~ ERROR `core::markers::Copy` is not implemented
 }
 
 fn b() {
     let x = box 3i;
     let y = &x;
-    let z = &x as &Foo; //~ ERROR `core::kinds::Copy` is not implemented
+    let z = &x as &Foo; //~ ERROR `core::markers::Copy` is not implemented
 }
 
 fn main() { }
index fdd8584a8bb06b19db9f2d2ae833116536c1e4e4..b46f91413a41caca5e2964991f2dd1eb39a0a678 100644 (file)
@@ -18,7 +18,7 @@ fn bar<F:FnOnce() + Send>(_: F) { }
 fn main() {
     let x = Rc::new(3u);
     bar(move|| foo(x));
-    //~^ ERROR `core::kinds::Send` is not implemented
-    //~^^ ERROR `core::kinds::Send` is not implemented
+    //~^ ERROR `core::markers::Send` is not implemented
+    //~^^ ERROR `core::markers::Send` is not implemented
 }
 
index c300096caf1e09c87bcb4f8e6c99d8e9cecbe837..1235a0a1228df4c7f0591e8f4529430e023c0f0b 100644 (file)
@@ -20,11 +20,11 @@ trait Message : Send { }
 
 fn object_ref_with_static_bound_not_ok() {
     assert_send::<&'static (Dummy+'static)>();
-    //~^ ERROR the trait `core::kinds::Send` is not implemented
+    //~^ ERROR the trait `core::markers::Send` is not implemented
 }
 
 fn box_object_with_no_bound_not_ok<'a>() {
-    assert_send::<Box<Dummy>>(); //~ ERROR the trait `core::kinds::Send` is not implemented
+    assert_send::<Box<Dummy>>(); //~ ERROR the trait `core::markers::Send` is not implemented
 }
 
 fn object_with_send_bound_ok() {
index d83a8031c45db51c016cb01553f53f006139d237..4f1a95859ae6f962aa08192f4823f2e603cb34d9 100644 (file)
@@ -18,7 +18,7 @@ trait Dummy { }
 // careful with object types, who knows what they close over...
 fn test51<'a>() {
     assert_send::<&'a Dummy>();
-    //~^ ERROR the trait `core::kinds::Send` is not implemented
+    //~^ ERROR the trait `core::markers::Send` is not implemented
 }
 fn test52<'a>() {
     assert_send::<&'a (Dummy+Send)>();
@@ -37,7 +37,7 @@ fn test61() {
 // them not ok
 fn test_71<'a>() {
     assert_send::<Box<Dummy+'a>>();
-    //~^ ERROR the trait `core::kinds::Send` is not implemented
+    //~^ ERROR the trait `core::markers::Send` is not implemented
 }
 
 fn main() { }
index ea8c262830633b20e1ff7c8b143dc0707106c6e6..06b8cf20258fc66fdf5bc04de70800a7f2a561fe 100644 (file)
@@ -14,11 +14,11 @@ fn assert_send<T:Send>() { }
 trait Dummy { }
 
 fn test50() {
-    assert_send::<&'static Dummy>(); //~ ERROR the trait `core::kinds::Send` is not implemented
+    assert_send::<&'static Dummy>(); //~ ERROR the trait `core::markers::Send` is not implemented
 }
 
 fn test53() {
-    assert_send::<Box<Dummy>>(); //~ ERROR the trait `core::kinds::Send` is not implemented
+    assert_send::<Box<Dummy>>(); //~ ERROR the trait `core::markers::Send` is not implemented
 }
 
 // ...unless they are properly bounded
index 4e1641025d5aec0fe480d219e5b6136324c36618..0a2f4cbce8505c3bb841e79c48180fcc96c95a87 100644 (file)
@@ -14,7 +14,7 @@ fn assert_send<T:Send>() { }
 
 fn test71<'a>() {
     assert_send::<*mut &'a int>();
-    //~^ ERROR the trait `core::kinds::Send` is not implemented for the type
+    //~^ ERROR the trait `core::markers::Send` is not implemented for the type
 }
 
 fn main() {
index 0d5b562e04cdd191afd220f4e1c8099954bada8f..3bdc44ec3638095ea315a9c4297da7027116b4cb 100644 (file)
@@ -19,7 +19,7 @@
 struct Foo {
     x: uint,
     b: bool, //~ ERROR: struct field is never used
-    marker: std::kinds::marker::NoCopy
+    marker: std::markers::NoCopy
 }
 
 fn field_read(f: Foo) -> uint {
@@ -59,7 +59,7 @@ fn field_match_in_let(f: Bar) -> bool {
 }
 
 fn main() {
-    field_read(Foo { x: 1, b: false, marker: std::kinds::marker::NoCopy });
+    field_read(Foo { x: 1, b: false, marker: std::markers::NoCopy });
     field_match_in_patterns(XYZ::Z);
     field_match_in_let(Bar { x: 42u, b: true, _guard: () });
     let _ = Baz { x: 0 };
index d620c13cc2520d15efb0d934bc44811a6dc094d4..e329cdc32d3ded0571efdc40f4e9f4ffe2959896 100644 (file)
@@ -8,11 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::kinds::marker;
+use std::markers;
 
 fn foo<P:Copy>(p: P) { }
 
 fn main()
 {
-    foo(marker::NoCopy); //~ ERROR the trait `core::kinds::Copy` is not implemented
+    foo(markers::NoCopy); //~ ERROR the trait `core::markers::Copy` is not implemented
 }
index 813e2548398b51304ab2ee03558c32a12350b9b8..dcbe63a417d3712d89e4da81471a79d125ee8996 100644 (file)
@@ -8,11 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::kinds::marker;
+use std::markers;
 
 fn foo<P:Send>(p: P) { }
 
 fn main()
 {
-    foo(marker::NoSend); //~ ERROR the trait `core::kinds::Send` is not implemented
+    foo(markers::NoSend); //~ ERROR the trait `core::markers::Send` is not implemented
 }
index 735e61fa139f0195e9bb24416af25c33af05767b..77d5fc23a3535f617ae3fdfa07a2b5df8db87f19 100644 (file)
@@ -8,11 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::kinds::marker;
+use std::markers;
 
 fn foo<P: Sync>(p: P) { }
 
 fn main()
 {
-    foo(marker::NoSync); //~ ERROR the trait `core::kinds::Sync` is not implemented
+    foo(markers::NoSync); //~ ERROR the trait `core::markers::Sync` is not implemented
 }
index 95ebb8bd882215524fe298fbe46989142cba7c91..711763c20c6d0b6b836ed07bdf3fd1f769f33e79 100644 (file)
@@ -15,6 +15,6 @@ fn f<T: Sync>(_: T) {}
 fn main() {
     let x = RefCell::new(0i);
     f(x);
-    //~^ ERROR `core::kinds::Sync` is not implemented
-    //~^^ ERROR `core::kinds::Sync` is not implemented
+    //~^ ERROR `core::markers::Sync` is not implemented
+    //~^^ ERROR `core::markers::Sync` is not implemented
 }
index af9c5256040dd2a97e524f9645b7f9a6e47b1440..01c977dc62c894509eca57c0a6e6630e60c6fdb8 100644 (file)
 // Tests that an `&` pointer to something inherently mutable is itself
 // to be considered mutable.
 
-use std::kinds::marker;
+use std::markers;
 
-enum Foo { A(marker::NoSync) }
+enum Foo { A(markers::NoSync) }
 
 fn bar<T: Sync>(_: T) {}
 
 fn main() {
-    let x = Foo::A(marker::NoSync);
-    bar(&x); //~ ERROR the trait `core::kinds::Sync` is not implemented
+    let x = Foo::A(markers::NoSync);
+    bar(&x); //~ ERROR the trait `core::markers::Sync` is not implemented
 }
index 9e56b27a05b6b5280d9cd583cc193eb5e8580724..66082d4654932a2f800437041d0cd4331bc4f4e2 100644 (file)
@@ -36,8 +36,8 @@ fn foo(x: Port<()>) -> foo {
     let x = foo(Port(Rc::new(())));
 
     Thread::spawn(move|| {
-        //~^ ERROR `core::kinds::Send` is not implemented
-        //~^^ ERROR `core::kinds::Send` is not implemented
+        //~^ ERROR `core::markers::Send` is not implemented
+        //~^^ ERROR `core::markers::Send` is not implemented
         let y = x;
         println!("{}", y);
     });
index 8b409cfe89dd8a80f31bc0e59cb87f8a24dd2271..2a0ffd932085af01673b5859cd9bfdff00439e4f 100644 (file)
@@ -8,16 +8,16 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::kinds::marker;
+use std::markers;
 
 enum Foo {
-    A(marker::NoSend)
+    A(markers::NoSend)
 }
 
 fn bar<T: Send>(_: T) {}
 
 fn main() {
-    let x = Foo::A(marker::NoSend);
+    let x = Foo::A(markers::NoSend);
     bar(x);
-    //~^ ERROR `core::kinds::Send` is not implemented
+    //~^ ERROR `core::markers::Send` is not implemented
 }
index 004921b1db0d2ab4b82045208be02aafef8b62a1..e604fd9f838f7b7704ad69bbc890143c797630d9 100644 (file)
@@ -15,6 +15,6 @@ fn bar<T: Send>(_: T) {}
 fn main() {
     let x = Rc::new(5i);
     bar(x);
-    //~^ ERROR `core::kinds::Send` is not implemented
-    //~^^ ERROR `core::kinds::Send` is not implemented
+    //~^ ERROR `core::markers::Send` is not implemented
+    //~^^ ERROR `core::markers::Send` is not implemented
 }
index 6e84578e92e3b9d0ea29ba92fa324be45fc846d5..7e2f7c55bd2726fb75666e65d54c2b2faa1113d5 100644 (file)
@@ -8,17 +8,17 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::kinds::marker;
+use std::markers;
 
 struct Foo {
     a: int,
-    ns: marker::NoSend
+    ns: markers::NoSend
 }
 
 fn bar<T: Send>(_: T) {}
 
 fn main() {
-    let x = Foo { a: 5, ns: marker::NoSend };
+    let x = Foo { a: 5, ns: markers::NoSend };
     bar(x);
-    //~^ ERROR the trait `core::kinds::Send` is not implemented
+    //~^ ERROR the trait `core::markers::Send` is not implemented
 }
index cb8ecd7259bb75e27e36ba875d5370bafa5fbab7..aeaa56c35a83fb827edba0bc123fdd7dee97a70a 100644 (file)
@@ -8,14 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::kinds::marker;
+use std::markers;
 
-enum Foo { A(marker::NoSync) }
+enum Foo { A(markers::NoSync) }
 
 fn bar<T: Sync>(_: T) {}
 
 fn main() {
-    let x = Foo::A(marker::NoSync);
+    let x = Foo::A(markers::NoSync);
     bar(x);
-    //~^ ERROR the trait `core::kinds::Sync` is not implemented
+    //~^ ERROR the trait `core::markers::Sync` is not implemented
 }
index ac3b456def526cbfe8f25d6dc40e3cfb39acbd30..66e8571527d03c89d1ea47aaf9e6a41875f005fb 100644 (file)
@@ -16,6 +16,6 @@ fn bar<T: Sync>(_: T) {}
 fn main() {
     let x = Rc::new(RefCell::new(5i));
     bar(x);
-    //~^ ERROR the trait `core::kinds::Sync` is not implemented
-    //~^^ ERROR the trait `core::kinds::Sync` is not implemented
+    //~^ ERROR the trait `core::markers::Sync` is not implemented
+    //~^^ ERROR the trait `core::markers::Sync` is not implemented
 }
index 1379a9f7382b006678b007d268ecf93238a305eb..ee6a29d31769a876388c37f375046c32847f64e3 100644 (file)
@@ -8,14 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::kinds::marker;
+use std::markers;
 
-struct Foo { a: int, m: marker::NoSync }
+struct Foo { a: int, m: markers::NoSync }
 
 fn bar<T: Sync>(_: T) {}
 
 fn main() {
-    let x = Foo { a: 5, m: marker::NoSync };
+    let x = Foo { a: 5, m: markers::NoSync };
     bar(x);
-    //~^ ERROR the trait `core::kinds::Sync` is not implemented
+    //~^ ERROR the trait `core::markers::Sync` is not implemented
 }
index 4aae8fa87daffbd7e6abcd8eb6e1ccf4ddbb6b4f..f949e89fcac0829ff6fb93bcf8c80ecd3447db6a 100644 (file)
@@ -30,7 +30,7 @@ impl Copy for IWantToCopyThis {}
 
 enum CantCopyThisEither {
     A,
-    B(::std::kinds::marker::NoCopy),
+    B(::std::markers::NoCopy),
 }
 
 enum IWantToCopyThisToo {
index 4af748661fd12e43b115e1cf3c9e50639506415c..b05117a71856cccbcbd9953066b6d254e1dad4e7 100644 (file)
@@ -23,5 +23,5 @@ pub fn main() {
     // Unsized type.
     let arr: &[_] = &[1u, 2, 3];
     let range = (*arr)..;
-    //~^ ERROR the trait `core::kinds::Sized` is not implemented
+    //~^ ERROR the trait `core::markers::Sized` is not implemented
 }
index 4dd028b78845996e18acfdb6f65d1a0446260bac..d8bad0f910321c5495deae19dbda8005acf1894a 100644 (file)
 // Note: see variance-regions-*.rs for the tests that check that the
 // variance inference works in the first place.
 
-use std::kinds::marker;
+use std::markers;
 
 // This is contravariant with respect to 'a, meaning that
 // Contravariant<'foo> <: Contravariant<'static> because
 // 'foo <= 'static
 struct Contravariant<'a> {
-    marker: marker::ContravariantLifetime<'a>
+    marker: markers::ContravariantLifetime<'a>
 }
 
 fn use_<'short,'long>(c: Contravariant<'short>,
index 93c06aecd30ecffdaf5ad5d732071fa44c06f59b..58c1f0c4721a08649fa2aa3c90c6b8fcaa214ab7 100644 (file)
 // Note: see variance-regions-*.rs for the tests that check that the
 // variance inference works in the first place.
 
-use std::kinds::marker;
+use std::markers;
 
 struct Covariant<'a> {
-    marker: marker::CovariantLifetime<'a>
+    marker: markers::CovariantLifetime<'a>
 }
 
 fn use_<'short,'long>(c: Covariant<'long>,
index ad5ad143b15bcbeed8dbc2979313515f5fd251d6..d3d6aa06cdba49c928fe80d540c79b3b6f307e4f 100644 (file)
@@ -8,10 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::kinds::marker;
+use std::markers;
 
 struct invariant<'a> {
-    marker: marker::InvariantLifetime<'a>
+    marker: markers::InvariantLifetime<'a>
 }
 
 fn to_same_lifetime<'r>(bi: invariant<'r>) {
index d3126cf44d1b152fcd01e39cfcd1f1bc09283832..d8a183c0e469bccc6a19824c97d94bccb0c5a35b 100644 (file)
@@ -25,5 +25,5 @@ fn drop(&mut self) {
 fn main() {
     let a = Foo { x: 3 };
     let _ = [ a; 5 ];
-    //~^ ERROR the trait `core::kinds::Copy` is not implemented for the type `Foo`
+    //~^ ERROR the trait `core::markers::Copy` is not implemented for the type `Foo`
 }
index 28e73f74ff3fcebe738ecd30d95dea7e9e7e1543..e0f241f87a76b7e338c6799b380a677cda72ee8c 100644 (file)
 
 // Verifies that static items can't be moved
 
-use std::kinds::marker;
+use std::markers;
 
 struct Foo {
     foo: int,
-    nocopy: marker::NoCopy
+    nocopy: markers::NoCopy
 }
 
-static BAR: Foo = Foo{foo: 5, nocopy: marker::NoCopy};
+static BAR: Foo = Foo{foo: 5, nocopy: markers::NoCopy};
 
 
 fn test(f: Foo) {
index e6dc712137f4218f96a3491a189f8cd56cf239d1..186f5f91eeeec6f8708058a137219620b6561d55 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::kinds::Send;
+use std::markers::Send;
 
 struct TestType;
 
index 3c84bc26298fdc23b3e948551c761268ff824c6c..bdfadcad2bf94ecaa74b7533ee757f1d4e03064c 100644 (file)
@@ -10,7 +10,7 @@
 
 #![feature(optin_builtin_traits)]
 
-use std::kinds::Send;
+use std::markers::Send;
 
 struct TestType;
 
index f673c3b797809803e0d1d7c5bb3bc57e0ded9f87..5bc96cae0bbeae2cd436c5ef233f6783b32a863b 100644 (file)
@@ -16,6 +16,6 @@ fn test_send<S: Send>() {}
 
 pub fn main() {
     test_send::<rand::ThreadRng>();
-    //~^ ERROR `core::kinds::Send` is not implemented
-    //~^^ ERROR `core::kinds::Send` is not implemented
+    //~^ ERROR `core::markers::Send` is not implemented
+    //~^^ ERROR `core::markers::Send` is not implemented
 }
index 85a2761172d6136d6973d940217826eabeb99be2..f569bed126d4572429e1b73b8ce6b77e88553867 100644 (file)
@@ -14,7 +14,7 @@ trait Foo {
 // This should emit the less confusing error, not the more confusing one.
 
 fn foo(_x: Foo + Send) {
-    //~^ERROR the trait `core::kinds::Sized` is not implemented
+    //~^ERROR the trait `core::markers::Sized` is not implemented
 }
 
 fn main() { }
index a7911eb791eb2338d836be4d377ebc6e1f6776a2..d3199ff982e00234ef7f332c8da5f95f9d0bfa46 100644 (file)
 // ignore-tidy-linelength
 
 use std::cell::UnsafeCell;
-use std::kinds::marker;
+use std::markers;
 
 struct MySync<T> {
     u: UnsafeCell<T>
 }
 
 struct NoSync {
-    m: marker::NoSync
+    m: markers::NoSync
 }
 
 fn test<T: Sync>(s: T){
@@ -30,17 +30,17 @@ fn test<T: Sync>(s: T){
 fn main() {
     let us = UnsafeCell::new(MySync{u: UnsafeCell::new(0i)});
     test(us);
-    //~^ ERROR `core::kinds::Sync` is not implemented
+    //~^ ERROR `core::markers::Sync` is not implemented
 
-    let uns = UnsafeCell::new(NoSync{m: marker::NoSync});
+    let uns = UnsafeCell::new(NoSync{m: markers::NoSync});
     test(uns);
-    //~^ ERROR `core::kinds::Sync` is not implemented
+    //~^ ERROR `core::markers::Sync` is not implemented
 
     let ms = MySync{u: uns};
     test(ms);
-    //~^ ERROR `core::kinds::Sync` is not implemented
+    //~^ ERROR `core::markers::Sync` is not implemented
 
-    let ns = NoSync{m: marker::NoSync};
+    let ns = NoSync{m: markers::NoSync};
     test(ns);
-    //~^ ERROR `core::kinds::Sync` is not implemented
+    //~^ ERROR `core::markers::Sync` is not implemented
 }
index 5ace9e115ec78bc79b1adafe3b6615e1135ae94b..ee7d2cc168c0a1654aa9fc1abd032744191e882b 100644 (file)
@@ -15,7 +15,7 @@
 #![feature(unboxed_closures)]
 #![allow(dead_code)]
 
-use std::kinds::marker;
+use std::markers;
 
 trait Foo<'a,T,U> {
     fn dummy(&'a self) -> &'a (T,U);
index 48d5028f4357d2111f1324f5e57a23e6df7fb40a..98d8b2d36cd6e79e888c05369ce9990bfda7fa55 100644 (file)
@@ -17,6 +17,6 @@ fn f<T:Send>(_i: T) {
 fn main() {
     let i = box Rc::new(100i);
     f(i);
-    //~^ ERROR `core::kinds::Send` is not implemented
-    //~^^ ERROR `core::kinds::Send` is not implemented
+    //~^ ERROR `core::markers::Send` is not implemented
+    //~^^ ERROR `core::markers::Send` is not implemented
 }
index 993df8e59f3e041e1b6de10f1381e657ea7f81a7..6398623e75b8765701af3eb1e02e46c807c79097 100644 (file)
@@ -30,7 +30,7 @@ fn foo(i:int, j: Rc<String>) -> foo {
 fn main() {
   let cat = "kitty".to_string();
   let (tx, _) = channel();
-  //~^ ERROR `core::kinds::Send` is not implemented
-  //~^^ ERROR `core::kinds::Send` is not implemented
+  //~^ ERROR `core::markers::Send` is not implemented
+  //~^^ ERROR `core::markers::Send` is not implemented
   tx.send(foo(42, Rc::new(cat)));
 }
index 2de490e018b44de240f5a898585840aac5946ce5..b6078cd3af47407aab48756c5c90bc54afd3a978 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn bar<T: Sized>() { }
-fn foo<T: ?Sized>() { bar::<T>() } //~ ERROR the trait `core::kinds::Sized` is not implemented
+fn foo<T: ?Sized>() { bar::<T>() } //~ ERROR the trait `core::markers::Sized` is not implemented
 fn main() { }
index aea236c9268157928593407a3e2bc85a4ccd4bbe..a78ffb13408921efa2217fd3a43f533e2e50d1a0 100644 (file)
@@ -15,14 +15,14 @@ fn not_sized<T: ?Sized>() { }
 enum Foo<U> { FooSome(U), FooNone }
 fn foo1<T>() { not_sized::<Foo<T>>() } // Hunky dory.
 fn foo2<T: ?Sized>() { not_sized::<Foo<T>>() }
-//~^ ERROR the trait `core::kinds::Sized` is not implemented
+//~^ ERROR the trait `core::markers::Sized` is not implemented
 //
 // Not OK: `T` is not sized.
 
 enum Bar<U: ?Sized> { BarSome(U), BarNone }
 fn bar1<T: ?Sized>() { not_sized::<Bar<T>>() }
 fn bar2<T: ?Sized>() { is_sized::<Bar<T>>() }
-//~^ ERROR the trait `core::kinds::Sized` is not implemented
+//~^ ERROR the trait `core::markers::Sized` is not implemented
 //
 // Not OK: `Bar<T>` is not sized, but it should be.
 
index 89c711036977a68addd796bfedd63652ad312293..c681267915528233be192bdbab6d00ecba3a77c3 100644 (file)
@@ -15,14 +15,14 @@ fn not_sized<T: ?Sized>() { }
 struct Foo<T> { data: T }
 fn foo1<T>() { not_sized::<Foo<T>>() } // Hunky dory.
 fn foo2<T: ?Sized>() { not_sized::<Foo<T>>() }
-//~^ ERROR the trait `core::kinds::Sized` is not implemented
+//~^ ERROR the trait `core::markers::Sized` is not implemented
 //
 // Not OK: `T` is not sized.
 
 struct Bar<T: ?Sized> { data: T }
 fn bar1<T: ?Sized>() { not_sized::<Bar<T>>() }
 fn bar2<T: ?Sized>() { is_sized::<Bar<T>>() }
-//~^ ERROR the trait `core::kinds::Sized` is not implemented
+//~^ ERROR the trait `core::markers::Sized` is not implemented
 //
 // Not OK: `Bar<T>` is not sized, but it should be.
 
index 7ae74fc2600c84d71416e431f997c6840278b901..9a29775f7c90ca804df9c658af7daa599f09aea2 100644 (file)
@@ -15,7 +15,7 @@ trait T2<Z> {
 }
 struct S4<Y: ?Sized>;
 impl<X: ?Sized> T2<X> for S4<X> {
-    //~^ ERROR `core::kinds::Sized` is not implemented for the type `X`
+    //~^ ERROR `core::markers::Sized` is not implemented for the type `X`
 }
 
 fn main() { }
index 9b7d10b0d0f761a3c4f6edf45bb8c0361aa4b06b..7e4a1d135570b2db3bc2deb1f9da8d037ecc7cc7 100644 (file)
@@ -14,7 +14,7 @@
 // Unbounded.
 fn f1<X: ?Sized>(x: &X) {
     f2::<X>(x);
-    //~^ ERROR the trait `core::kinds::Sized` is not implemented
+    //~^ ERROR the trait `core::markers::Sized` is not implemented
 }
 fn f2<X>(x: &X) {
 }
@@ -23,7 +23,7 @@ fn f2<X>(x: &X) {
 trait T {}
 fn f3<X: ?Sized + T>(x: &X) {
     f4::<X>(x);
-    //~^ ERROR the trait `core::kinds::Sized` is not implemented
+    //~^ ERROR the trait `core::markers::Sized` is not implemented
 }
 fn f4<X: T>(x: &X) {
 }
@@ -37,7 +37,7 @@ fn f5<Y>(x: &Y) {}
 fn f6<X: ?Sized>(x: &X) {}
 fn f7<X: ?Sized>(x1: &E<X>, x2: &E<X>) {
     f5(x1);
-    //~^ ERROR the trait `core::kinds::Sized` is not implemented
+    //~^ ERROR the trait `core::markers::Sized` is not implemented
     f6(x2); // ok
 }
 
@@ -49,19 +49,19 @@ struct S<X: ?Sized> {
 
 fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) {
     f5(x1);
-    //~^ ERROR the trait `core::kinds::Sized` is not implemented
+    //~^ ERROR the trait `core::markers::Sized` is not implemented
     f6(x2); // ok
 }
 
 // Test some tuples.
 fn f9<X: ?Sized>(x1: Box<S<X>>, x2: Box<E<X>>) {
     f5(&(*x1, 34i));
-    //~^ ERROR the trait `core::kinds::Sized` is not implemented
+    //~^ ERROR the trait `core::markers::Sized` is not implemented
 }
 
 fn f10<X: ?Sized>(x1: Box<S<X>>, x2: Box<E<X>>) {
     f5(&(32i, *x2));
-    //~^ ERROR the trait `core::kinds::Sized` is not implemented
+    //~^ ERROR the trait `core::markers::Sized` is not implemented
 }
 
 pub fn main() {
index f7477d746fae42faac883697deb0af0e5b681b28..a714b7d92383b1564377031d1607b8d9e2027ac7 100644 (file)
@@ -8,30 +8,30 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Test `Sized?` types not allowed in fields (except the last one).
+// Test `?Sized` types not allowed in fields (except the last one).
 
 struct S1<X: ?Sized> {
-    f1: X, //~ ERROR `core::kinds::Sized` is not implemented
+    f1: X, //~ ERROR `core::markers::Sized` is not implemented
     f2: int,
 }
 struct S2<X: ?Sized> {
     f: int,
-    g: X, //~ ERROR `core::kinds::Sized` is not implemented
+    g: X, //~ ERROR `core::markers::Sized` is not implemented
     h: int,
 }
 struct S3 {
-    f: str, //~ ERROR `core::kinds::Sized` is not implemented
+    f: str, //~ ERROR `core::markers::Sized` is not implemented
     g: [uint]
 }
 struct S4 {
-    f: str, //~ ERROR `core::kinds::Sized` is not implemented
+    f: str, //~ ERROR `core::markers::Sized` is not implemented
     g: uint
 }
 enum E<X: ?Sized> {
-    V1(X, int), //~ERROR `core::kinds::Sized` is not implemented
+    V1(X, int), //~ERROR `core::markers::Sized` is not implemented
 }
 enum F<X: ?Sized> {
-    V2{f1: X, f: int}, //~ERROR `core::kinds::Sized` is not implemented
+    V2{f1: X, f: int}, //~ERROR `core::markers::Sized` is not implemented
 }
 
 pub fn main() {
index b4f0a4912cf3019152bb6b9d1c1f359a9dc803aa..d3b03493fdcb3d34792a1b7dcc5cdb78bd4a0f48 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Test `Sized?` local variables.
+// Test `?Sized` local variables.
 
 
 trait T {}
@@ -16,27 +16,27 @@ trait T {}
 fn f1<X: ?Sized>(x: &X) {
     let _: X; // <-- this is OK, no bindings created, no initializer.
     let _: (int, (X, int)); // same
-    let y: X; //~ERROR the trait `core::kinds::Sized` is not implemented
-    let y: (int, (X, int)); //~ERROR the trait `core::kinds::Sized` is not implemented
+    let y: X; //~ERROR the trait `core::markers::Sized` is not implemented
+    let y: (int, (X, int)); //~ERROR the trait `core::markers::Sized` is not implemented
 }
 fn f2<X: ?Sized + T>(x: &X) {
-    let y: X; //~ERROR the trait `core::kinds::Sized` is not implemented
-    let y: (int, (X, int)); //~ERROR the trait `core::kinds::Sized` is not implemented
+    let y: X; //~ERROR the trait `core::markers::Sized` is not implemented
+    let y: (int, (X, int)); //~ERROR the trait `core::markers::Sized` is not implemented
 }
 
 fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
-    let y: X = *x1; //~ERROR the trait `core::kinds::Sized` is not implemented
-    let y = *x2; //~ERROR the trait `core::kinds::Sized` is not implemented
-    let (y, z) = (*x3, 4i); //~ERROR the trait `core::kinds::Sized` is not implemented
+    let y: X = *x1; //~ERROR the trait `core::markers::Sized` is not implemented
+    let y = *x2; //~ERROR the trait `core::markers::Sized` is not implemented
+    let (y, z) = (*x3, 4i); //~ERROR the trait `core::markers::Sized` is not implemented
 }
-fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
-    let y: X = *x1;         //~ERROR the trait `core::kinds::Sized` is not implemented
-    let y = *x2;            //~ERROR the trait `core::kinds::Sized` is not implemented
-    let (y, z) = (*x3, 4i); //~ERROR the trait `core::kinds::Sized` is not implemented
+fn f4<X: ?Sized: T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+    let y: X = *x1;         //~ERROR the trait `core::markers::Sized` is not implemented
+    let y = *x2;            //~ERROR the trait `core::markers::Sized` is not implemented
+    let (y, z) = (*x3, 4i); //~ERROR the trait `core::markers::Sized` is not implemented
 }
 
-fn g1<X: ?Sized>(x: X) {} //~ERROR the trait `core::kinds::Sized` is not implemented
-fn g2<X: ?Sized + T>(x: X) {} //~ERROR the trait `core::kinds::Sized` is not implemented
+fn g1<X: ?Sized>(x: X) {} //~ERROR the trait `core::markers::Sized` is not implemented
+fn g2<X: ?Sized + T>(x: X) {} //~ERROR the trait `core::markers::Sized` is not implemented
 
 pub fn main() {
 }
index 8a54771112f8e4189c77abee87a57b0428ac23d7..32daa2a246ed24a08383bf74c415c687c569c522 100644 (file)
@@ -18,7 +18,7 @@ trait T1<Z: T> {
 }
 struct S3<Y: ?Sized>;
 impl<X: ?Sized + T> T1<X> for S3<X> {
-    //~^ ERROR `core::kinds::Sized` is not implemented for the type `X`
+    //~^ ERROR `core::markers::Sized` is not implemented for the type `X`
 }
 
 fn main() { }
index 8d72e260a18f7485be40045d2f984290d04ecb3a..c584c30448f09aeaa65ccaefc93df42dc45c2d06 100644 (file)
@@ -21,7 +21,7 @@ fn needs_copy(self) where T: Copy {
 
     fn fails_copy(self) {
         require_copy(self.x);
-        //~^ ERROR the trait `core::kinds::Copy` is not implemented for the type `T`
+        //~^ ERROR the trait `core::markers::Copy` is not implemented for the type `T`
     }
 }
 
index 096b53a1ea6244ba30127f17b15ed90817c632b5..45df3af08d48a30c3dcb710784b68cd4915673fb 100644 (file)
@@ -26,7 +26,7 @@ fn needs_copy(self) where T: Copy {
 
     fn fails_copy(self) {
         require_copy(self.x);
-        //~^ ERROR the trait `core::kinds::Copy` is not implemented for the type `T`
+        //~^ ERROR the trait `core::markers::Copy` is not implemented for the type `T`
     }
 }
 
index 388a2d734473153f9b4c602bd59d99efa6cc51df..d18d6ffd7d06b2816ad4922659dd70b46860753c 100644 (file)
@@ -19,7 +19,7 @@
 #![feature(lang_items, unboxed_closures)]
 #![no_implicit_prelude]
 
-use std::kinds::Sized;
+use std::markers::Sized;
 use std::option::Option::{None, Some, self};
 
 trait Iterator {
index abbe250b6279a17051edf12a87281d7a6d367eb0..4ebf071cbc151cc4d481f4d1426ebf45b8468de0 100644 (file)
@@ -19,7 +19,7 @@
 #![feature(lang_items, unboxed_closures)]
 #![no_implicit_prelude]
 
-use std::kinds::Sized;
+use std::markers::Sized;
 use std::option::Option::{None, Some, self};
 
 trait Iterator {
index 35783ea5899d55897a1a1e245b902f5439d9a430..9ec68264076dd38f1db2fa2b281025388e532ed1 100644 (file)
@@ -11,7 +11,7 @@
 #![allow(dead_code)]
 #![allow(unused_unsafe)]
 
-use std::kinds::Sync;
+use std::markers::Sync;
 
 struct Foo {
     a: uint,
index 14843b30e1c41a3b5a0a7ad46fa9e927e472f42c..5ce8eb64318eeb34ec7b4fba6c7ab6ab2d3b6141 100644 (file)
@@ -11,7 +11,7 @@
 // Issue 4691: Ensure that functional-struct-updates operates
 // correctly and moves rather than copy when appropriate.
 
-use std::kinds::marker::NoCopy as NP;
+use std::markers::NoCopy as NP;
 
 struct ncint { np: NP, v: int }
 fn ncint(v: int) -> ncint { ncint { np: NP, v: v } }
index 0616a7b21b546d94af2217a355fc896d593b2fb7..e364cb0c9a2abc32bfa3d9bafe6f1059088722be 100644 (file)
@@ -18,7 +18,7 @@
 
 #![allow(dead_code)]
 
-use std::kinds::marker;
+use std::markers;
 
 #[derive(Copy)]
 struct Foo<T> { x: T }
@@ -26,7 +26,7 @@ struct Foo<T> { x: T }
 type Ty<'tcx> = &'tcx TyS<'tcx>;
 
 enum TyS<'tcx> {
-    Boop(marker::InvariantLifetime<'tcx>)
+    Boop(markers::InvariantLifetime<'tcx>)
 }
 
 enum Bar<'tcx> {
index 0851f0e367bf85ce977ae5685d593e6d217a17da..ac9a70379f8f9a5ce12e159bcbd2b65065eb5ecf 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::kinds::marker;
+use std::markers;
 use std::cell::UnsafeCell;
 
 struct MyUnsafePack<T>(UnsafeCell<T>);
index f414606340924b82c3b87b0ae8efefce2711230a..435b16998837bb738165ea68138b08fabf52e45f 100644 (file)
@@ -23,7 +23,7 @@ pub mod pipes {
     use std::mem::{replace, swap};
     use std::mem;
     use std::thread::Thread;
-    use std::kinds::Send;
+    use std::markers::Send;
 
     pub struct Stuff<T> {
         state: state,
index e81244d4beabc20c1b9a1269db02b6c97b367180..279f05ea1c9467309511c6d3cc02cba082437539 100644 (file)
@@ -13,7 +13,7 @@
 // know not to stop at the blanket, we have to recursively evaluate
 // the `T:Foo` bound.
 
-use std::kinds::Sized;
+use std::markers::Sized;
 
 // Note: this must be generic for the problem to show up
 trait Foo<A> {
index 8b9d6af1017b5ca4d122586ec03ba07cc2b5bc5d..a750b3f4b4e10bc11feb839a566b2f7152aff087 100644 (file)
@@ -11,7 +11,7 @@
 // Test that a type whose lifetime parameters is never used is
 // inferred to be bivariant.
 
-use std::kinds::marker;
+use std::markers;
 
 struct Bivariant<'a>;
 
index 021cfedf06f96c337e73ee815d4e4474ee495e06..244e084e65b822c6afe8a4d9ff5c8ee212e0a409 100644 (file)
@@ -10,7 +10,7 @@
 
 #![feature(optin_builtin_traits)]
 
-use std::kinds::Send;
+use std::markers::Send;
 
 struct TestType;