]> git.lizzy.rs Git - rust.git/commitdiff
markers -> marker
authorNick Cameron <ncameron@mozilla.com>
Tue, 6 Jan 2015 22:33:42 +0000 (11:33 +1300)
committerNick Cameron <ncameron@mozilla.com>
Tue, 6 Jan 2015 23:10:31 +0000 (12:10 +1300)
155 files changed:
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/lib.rs
src/libcore/marker.rs [new file with mode: 0644]
src/libcore/markers.rs [deleted file]
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/closure-bounds-cant-promote-superkind-in-struct.rs
src/test/compile-fail/closure-bounds-subtype.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 a3b77ccb6dbda567b2f1e1c9cfdeb7681ff9fbef..841882b4719a58567ad2c1ccc2525706dafeb71d 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::markers::{Sync, Send};
+use core::marker::{Sync, Send};
 use core::mem::{min_align_of, size_of, drop};
 use core::mem;
 use core::nonzero::NonZero;
index 0b211c7c2125652a69bca6bd37a486e5aedb6a6b..a7f76c02bd8b100990e30d4177f92128cca4cfb5 100644 (file)
@@ -18,7 +18,7 @@
 use core::default::Default;
 use core::fmt;
 use core::hash::{self, Hash};
-use core::markers::Sized;
+use core::marker::Sized;
 use core::mem;
 use core::option::Option;
 use core::ptr::Unique;
index c6eaaaeecca1bed4c33ae342a2d11fadff765218..69a0d596644d28ccc5320aab9729c903b1365c49 100644 (file)
 use core::default::Default;
 use core::fmt;
 use core::hash::{self, Hash};
-use core::markers;
+use core::marker;
 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: markers::NoSend,
-    _noshare: markers::NoSync
+    _nosend: marker::NoSend,
+    _noshare: marker::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: markers::NoSend,
-                _noshare: markers::NoSync
+                _nosend: marker::NoSend,
+                _noshare: marker::NoSync
             }
         }
     }
@@ -223,8 +223,8 @@ pub fn downgrade(&self) -> Weak<T> {
         self.inc_weak();
         Weak {
             _ptr: self._ptr,
-            _nosend: markers::NoSend,
-            _noshare: markers::NoSync
+            _nosend: marker::NoSend,
+            _noshare: marker::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: markers::NoSend, _noshare: markers::NoSync }
+        Rc { _ptr: self._ptr, _nosend: marker::NoSend, _noshare: marker::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: markers::NoSend,
-    _noshare: markers::NoSync
+    _nosend: marker::NoSend,
+    _noshare: marker::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: markers::NoSend, _noshare: markers::NoSync })
+            Some(Rc { _ptr: self._ptr, _nosend: marker::NoSend, _noshare: marker::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: markers::NoSend, _noshare: markers::NoSync }
+        Weak { _ptr: self._ptr, _nosend: marker::NoSend, _noshare: marker::NoSync }
     }
 }
 
index 73cc46091e99a89317c46c9a8a896a76ba414ecc..66c28375d7a2b941d5e5f52b099bb946096cbe92 100644 (file)
@@ -480,7 +480,7 @@ enum Continuation<A, B> {
 /// boilerplate gets cut out.
 mod stack {
     use core::prelude::*;
-    use core::markers;
+    use core::marker;
     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: markers::InvariantLifetime<'id>
+        marker: marker::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: markers::InvariantLifetime<'id>
+        marker: marker::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: markers::InvariantLifetime
+                marker: marker::InvariantLifetime
             };
             let node = IdRef {
                 inner: unsafe { &mut *self.next },
-                marker: markers::InvariantLifetime
+                marker: marker::InvariantLifetime
             };
 
             closure(pusher, node)
index cbe5d2404e7301ec8e145a18f8b841c55a268622..5463d135c08b0eaa8de33ce3d293698f008d3d6b 100644 (file)
@@ -124,8 +124,8 @@ mod std {
     pub use core::clone;    // deriving(Clone)
     pub use core::cmp;      // deriving(Eq, Ord, etc.)
     #[cfg(stage0)]
-    pub use core::markers as kinds;
-    pub use core::markers;  // deriving(Copy)
+    pub use core::marker as kinds;
+    pub use core::marker;  // deriving(Copy)
     pub use core::hash;     // deriving(Hash)
 }
 
@@ -140,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::markers::{Copy, Send, Sized, Sync};
+    pub use core::marker::{Copy, Send, Sized, Sync};
     pub use core::mem::drop;
     pub use core::ops::{Drop, Fn, FnMut, FnOnce};
     pub use core::option::Option;
index 3c1cd101e3b865bac425b942c0aad423fa9fd646..38993520da152206f304ef4a5cb816602afd09c0 100644 (file)
@@ -20,7 +20,7 @@
 use core::default::Default;
 use core::fmt;
 use core::iter::{self, repeat, FromIterator, RandomAccessIterator};
-use core::markers;
+use core::marker;
 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: markers::ContravariantLifetime::<'a>,
+            marker: marker::ContravariantLifetime::<'a>,
         }
     }
 
@@ -1414,7 +1414,7 @@ pub struct IterMut<'a, T:'a> {
     tail: uint,
     head: uint,
     cap: uint,
-    marker: markers::ContravariantLifetime<'a>,
+    marker: marker::ContravariantLifetime<'a>,
 }
 
 #[stable]
index d7e0b3d93532d8304a42f5c61b329982adae794c..6acb75387fdc3154f79cf25ccf02a2153a1cf9bf 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::markers::Sized;
+use core::marker::Sized;
 use core::mem::size_of;
 use core::mem;
 use core::ops::{FnMut, SliceMut};
index b3b560a23bdebcaa93f424f89997fdf4a7b37229..9979fe128fc2e6ef0213d09eea322eea8dd20505 100644 (file)
@@ -55,7 +55,7 @@
 use core::fmt;
 use core::hash::{self, Hash};
 use core::iter::{repeat, FromIterator};
-use core::markers::{ContravariantLifetime, InvariantType};
+use core::marker::{ContravariantLifetime, InvariantType};
 use core::mem;
 use core::nonzero::NonZero;
 use core::num::{Int, UnsignedInt};
index f85b17fb7f09ba5e2830016ece3049fee0fb58e3..2013c398c5542c7778c79579d7cec3293566aef2 100644 (file)
@@ -17,7 +17,7 @@
 use clone::Clone;
 use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering};
 use fmt;
-use markers::Copy;
+use marker::Copy;
 use ops::Deref;
 use option::Option;
 
index 9e5bda4bf43c89caadce22f0bb210d2c74993e3f..aee1d825bc2408d58dd1375dd44764f97065b564 100644 (file)
@@ -72,7 +72,7 @@
 
 use self::Ordering::*;
 
-use markers::Sync;
+use marker::Sync;
 
 use intrinsics;
 use cell::UnsafeCell;
index c4adf724b2f71cb9bfd195cf49a065134537675d..de9c79614b3bd53ce1f52f459368b852ceb1c75b 100644 (file)
@@ -47,7 +47,7 @@
 use clone::Clone;
 use cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
 use fmt;
-use markers::Sized;
+use marker::Sized;
 use ops::Deref;
 use option::Option;
 use self::Cow::*;
index ae590b1de061b1b9e58afd8aa393edf006a58a8e..7217468c74ed962e8ed6dc32ecbeda58fdc212d0 100644 (file)
 use cmp::PartialEq;
 use default::Default;
 use fmt;
-use markers::{Copy, Send};
+use marker::{Copy, Send};
 use ops::{Deref, DerefMut, Drop};
 use option::Option;
 use option::Option::{None, Some};
@@ -520,11 +520,11 @@ fn deref_mut<'a>(&'a mut self) -> &'a mut T {
 ///
 /// ```rust
 /// use std::cell::UnsafeCell;
-/// use std::markers;
+/// use std::marker;
 ///
 /// struct NotThreadSafe<T> {
 ///     value: UnsafeCell<T>,
-///     marker: markers::NoSync
+///     marker: marker::NoSync
 /// }
 /// ```
 ///
index 78a5848f34dd6aaac571138ac5cfe95bc540e332..3149247a83aed96cf4df8e6af48ef4178138febf 100644 (file)
@@ -21,7 +21,7 @@
 
 #![stable]
 
-use markers::Sized;
+use marker::Sized;
 
 /// A common trait for cloning an object.
 #[stable]
index 01f1073a5d390c7eb930354644b40d82a8d02bfb..c3dfd5f51595f80b1c0e561cc4c68ca4852ad615 100644 (file)
@@ -43,7 +43,7 @@
 
 use self::Ordering::*;
 
-use markers::Sized;
+use marker::Sized;
 use option::Option::{self, Some, None};
 
 /// Trait for equality comparisons which are [partial equivalence relations](
@@ -316,7 +316,7 @@ pub fn partial_max<T: PartialOrd>(v1: T, v2: T) -> Option<T> {
 mod impls {
     use cmp::{PartialOrd, Ord, PartialEq, Eq, Ordering};
     use cmp::Ordering::{Less, Greater, Equal};
-    use markers::Sized;
+    use marker::Sized;
     use option::Option;
     use option::Option::{Some, None};
 
index ed01cf647697390552f76b93c4bbf27802064249..c7ff0f938b667f370b8ab458fc8e644e0e96b294 100644 (file)
@@ -15,7 +15,7 @@
 use any;
 use cell::{Cell, Ref, RefMut};
 use iter::{Iterator, IteratorExt, range};
-use markers::{Copy, Sized};
+use marker::{Copy, Sized};
 use mem;
 use option::Option;
 use option::Option::{Some, None};
index ac5804c910d093c95b156361e5716664a938525b..97d26b5333aab7675f34b9f0fb9a697b3ac3f313 100644 (file)
@@ -67,7 +67,7 @@
 use ops::{Add, Deref, FnMut};
 use option::Option;
 use option::Option::{Some, None};
-use std::markers::Sized;
+use std::marker::Sized;
 use uint;
 
 /// An interface for dealing with "external iterators". These types of iterators
index c06dc056d20cb17e938c922f1954674e0895faf1..98b1e8db89fec793f5c15f47ef6da920e163c0e8 100644 (file)
 
 /* Core language traits */
 
-pub mod markers;
+pub mod marker;
 pub mod ops;
 pub mod cmp;
 pub mod clone;
@@ -151,8 +151,8 @@ mod std {
     pub use clone;
     pub use cmp;
     #[cfg(stage0)]
-    pub use markers as kinds;
-    pub use markers;
+    pub use marker as kinds;
+    pub use marker;
     pub use option;
     pub use fmt;
     pub use hash;
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs
new file mode 100644 (file)
index 0000000..d400cb4
--- /dev/null
@@ -0,0 +1,314 @@
+// 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.
+
+#![stable]
+
+use clone::Clone;
+
+/// Types able to be transferred across task boundaries.
+#[unstable = "will be overhauled with new lifetime rules; see RFC 458"]
+#[lang="send"]
+pub unsafe trait Send: 'static {
+    // empty.
+}
+
+/// Types with a constant size known at compile-time.
+#[stable]
+#[lang="sized"]
+pub trait Sized {
+    // Empty.
+}
+
+/// Types that can be copied by simply copying bits (i.e. `memcpy`).
+#[stable]
+#[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::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).
+#[unstable = "will be overhauled with new lifetime rules; see RFC 458"]
+#[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).
+#[unstable = "likely to change with new variance strategy"]
+#[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.
+#[unstable = "likely to change with new variance strategy"]
+#[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.
+#[unstable = "likely to change with new variance strategy"]
+#[lang="invariant_type"]
+#[derive(PartialEq, Eq, PartialOrd, Ord)]
+pub struct InvariantType<T: ?Sized>;
+
+#[unstable = "likely to change with new variance strategy"]
+impl<T: ?Sized> Copy for InvariantType<T> {}
+#[unstable = "likely to change with new variance strategy"]
+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>.
+#[unstable = "likely to change with new variance strategy"]
+#[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>.
+#[unstable = "likely to change with new variance strategy"]
+#[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`).
+#[unstable = "likely to change with new variance strategy"]
+#[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.
+#[unstable = "likely to change with new variance strategy"]
+#[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.
+#[unstable = "likely to change with new variance strategy"]
+#[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.
+#[unstable = "likely to change with new variance strategy"]
+#[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.
+#[unstable = "likely to change with new variance strategy"]
+#[lang="managed_bound"]
+#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
+#[allow(missing_copy_implementations)]
+pub struct Managed;
diff --git a/src/libcore/markers.rs b/src/libcore/markers.rs
deleted file mode 100644 (file)
index f218eac..0000000
+++ /dev/null
@@ -1,314 +0,0 @@
-// 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.
-
-#![stable]
-
-use clone::Clone;
-
-/// Types able to be transferred across task boundaries.
-#[unstable = "will be overhauled with new lifetime rules; see RFC 458"]
-#[lang="send"]
-pub unsafe trait Send: 'static {
-    // empty.
-}
-
-/// Types with a constant size known at compile-time.
-#[stable]
-#[lang="sized"]
-pub trait Sized {
-    // Empty.
-}
-
-/// Types that can be copied by simply copying bits (i.e. `memcpy`).
-#[stable]
-#[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).
-#[unstable = "will be overhauled with new lifetime rules; see RFC 458"]
-#[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).
-#[unstable = "likely to change with new variance strategy"]
-#[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.
-#[unstable = "likely to change with new variance strategy"]
-#[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.
-#[unstable = "likely to change with new variance strategy"]
-#[lang="invariant_type"]
-#[derive(PartialEq, Eq, PartialOrd, Ord)]
-pub struct InvariantType<T: ?Sized>;
-
-#[unstable = "likely to change with new variance strategy"]
-impl<T: ?Sized> Copy for InvariantType<T> {}
-#[unstable = "likely to change with new variance strategy"]
-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>.
-#[unstable = "likely to change with new variance strategy"]
-#[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>.
-#[unstable = "likely to change with new variance strategy"]
-#[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`).
-#[unstable = "likely to change with new variance strategy"]
-#[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.
-#[unstable = "likely to change with new variance strategy"]
-#[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.
-#[unstable = "likely to change with new variance strategy"]
-#[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.
-#[unstable = "likely to change with new variance strategy"]
-#[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.
-#[unstable = "likely to change with new variance strategy"]
-#[lang="managed_bound"]
-#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
-#[allow(missing_copy_implementations)]
-pub struct Managed;
index 24cb649ce55e4795b453c55d8cf3057138f5adfc..8438c9b206ee7132ac9331b94c7c6a127e746ffc 100644 (file)
@@ -15,7 +15,7 @@
 
 #![stable]
 
-use markers::Sized;
+use marker::Sized;
 use intrinsics;
 use ptr;
 
index 258337410246d18ea877e6bcf9a6c5054fe3f245..046406ee4d976fe51e048c8bc101a2e86a9027d3 100644 (file)
@@ -21,7 +21,7 @@
 use cmp::{PartialOrd, Ord};
 use intrinsics;
 use iter::IteratorExt;
-use markers::Copy;
+use marker::Copy;
 use mem::size_of;
 use ops::{Add, Sub, Mul, Div, Rem, Neg};
 use ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr};
@@ -992,7 +992,7 @@ 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 : ::markers::Sized {
+pub trait FromPrimitive : ::marker::Sized {
     /// Convert an `int` to return an optional value of this type. If the
     /// value cannot be represented by this value, the `None` is returned.
     #[inline]
index 287a725a33c26836c08eb2afdd57141ca791733c..239aa6058ccf3ef7b11ff6df3b6355acf7fabf16 100644 (file)
@@ -63,7 +63,7 @@
 
 use clone::Clone;
 use iter::{Step, Iterator,DoubleEndedIterator,ExactSizeIterator};
-use markers::Sized;
+use marker::Sized;
 use option::Option::{self, Some, None};
 
 /// The `Drop` trait is used to run some code when a value goes out of scope. This
index 558e451ee8c2aa620e5fcad05fcf0a1cdcf7b403..c175b83e7609a524c3ce36820b0610a2dc21791d 100644 (file)
@@ -29,7 +29,7 @@
 //! ```
 
 // Reexported core operators
-pub use markers::{Copy, Send, Sized, Sync};
+pub use marker::{Copy, Send, Sized, Sync};
 pub use ops::{Drop, Fn, FnMut, FnOnce};
 
 // Reexported functions
index 40c7d60a2057c8390c7c506a0ce255c2c11e30f7..c35d948165ab8084ee5e4feb5abe044a6642d942 100644 (file)
@@ -92,7 +92,7 @@
 use clone::Clone;
 use intrinsics;
 use option::Option::{self, Some, None};
-use markers::{Send, Sized, Sync};
+use marker::{Send, Sized, Sync};
 
 use cmp::{PartialEq, Eq, Ord, PartialOrd};
 use cmp::Ordering::{self, Less, Equal, Greater};
index 57f1706dc4368012e5d03ce256b3544c9f5da89a..1ad6d43f76f0919308996a5034f230e7929fc78e 100644 (file)
@@ -18,7 +18,7 @@
 //!
 //! Their definition should always match the ABI defined in `rustc::back::abi`.
 
-use markers::Copy;
+use marker::Copy;
 use mem;
 
 /// The representation of a Rust slice
index e4a15d385359cc42e83e4f4d647230a39f205b7f..3d55d09ccf125faf266321e657466dcd759a82c7 100644 (file)
@@ -41,7 +41,7 @@
 use cmp;
 use default::Default;
 use iter::*;
-use markers::Copy;
+use marker::Copy;
 use num::Int;
 use ops::{FnMut, self};
 use option::Option;
@@ -52,7 +52,7 @@
 use ptr::PtrExt;
 use mem;
 use mem::size_of;
-use markers::{Sized, self};
+use marker::{Sized, self};
 use raw::Repr;
 // Avoid conflicts with *both* the Slice trait (buggy) and the `slice::raw` module.
 use raw::Slice as RawSlice;
@@ -169,11 +169,11 @@ 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: markers::ContravariantLifetime::<'a>}
+                      marker: marker::ContravariantLifetime::<'a>}
             } else {
                 Iter {ptr: p,
                       end: p.offset(self.len() as int),
-                      marker: markers::ContravariantLifetime::<'a>}
+                      marker: marker::ContravariantLifetime::<'a>}
             }
         }
     }
@@ -322,11 +322,11 @@ 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: markers::ContravariantLifetime::<'a>}
+                         marker: marker::ContravariantLifetime::<'a>}
             } else {
                 IterMut {ptr: p,
                          end: p.offset(self.len() as int),
-                         marker: markers::ContravariantLifetime::<'a>}
+                         marker: marker::ContravariantLifetime::<'a>}
             }
         }
     }
@@ -734,7 +734,7 @@ macro_rules! make_slice {
 pub struct Iter<'a, T: 'a> {
     ptr: *const T,
     end: *const T,
-    marker: markers::ContravariantLifetime<'a>
+    marker: marker::ContravariantLifetime<'a>
 }
 
 #[experimental]
@@ -809,7 +809,7 @@ fn idx(&mut self, index: uint) -> Option<&'a T> {
 pub struct IterMut<'a, T: 'a> {
     ptr: *mut T,
     end: *mut T,
-    marker: markers::ContravariantLifetime<'a>,
+    marker: marker::ContravariantLifetime<'a>,
 }
 
 #[experimental]
index f1f3cabb66b10e552fdacf12a0d0e3fecd83837b..d9db50b0d5a967a978dca7c30e95734f8568f777 100644 (file)
@@ -23,7 +23,7 @@
 use iter::range;
 use iter::ExactSizeIterator;
 use iter::{Map, Iterator, IteratorExt, DoubleEndedIterator};
-use markers::Sized;
+use marker::Sized;
 use mem;
 use num::Int;
 use ops::{Fn, FnMut};
index 9de3cf30dc9af6c16637d60b20b218559b475bcd..35c1cb09281f41cc035500f52014afca66f60754 100644 (file)
@@ -10,4 +10,4 @@
 
 //! Types dealing with unsafe actions.
 
-use markers;
+use marker;
index 3af38f9035dd4bc40cbb9c4f23967aa0edbcef57..63bf9ec331454f368c7cb354888425a7aa53018f 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::markers::Sized;
+use core::marker::Sized;
 use std::mem;
 
 use core::slice::SliceExt;
index 57e0737e909c99713dfe12acfc826f4a4ed03368..1e8d2d4bc610d0cdfde01403c6f654bb08a2a84b 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::markers::Copy;
+use core::marker::Copy;
 
 #[cfg_attr(stage0, macro_escape)]
 #[cfg_attr(not(stage0), macro_use)]
index 5588fbce26ad034e771fccb07c3d61eb4b936fb5..1169f910238022b2c7148e013d8ef10b96b20f98 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use core::option::*;
-use core::markers;
+use core::marker;
 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(markers::NoCopy);
+    let mut y = Some(marker::NoCopy);
     let _y2 = y.take().unwrap();
     let _y3 = y.take().unwrap();
 }
index 4255114243cf5da45768d8864bc7cbe3442aed7e..86ed8794e1a04a8a5c059f1f2d24bc105e8872e4 100644 (file)
@@ -5082,6 +5082,6 @@ pub fn issue_14344_workaround() {} // FIXME #14344 force linkage to happen corre
 #[cfg(not(test))]
 mod std {
     #[cfg(stage0)]
-    pub use core::markers as kinds;
-    pub use core::markers;
+    pub use core::marker as kinds;
+    pub use core::marker;
 }
index 9e900fcb3db0f233f75be8fc3f683b9f76fd5f22..95dbbf9efcf372b7bbde4195b377bdec62bc2e1e 100644 (file)
@@ -517,8 +517,8 @@ mod std {
     pub use core::{option, fmt}; // panic!()
     pub use core::clone; // derive Clone
     #[cfg(stage0)]
-    pub use core::markers as kinds;
-    pub use core::markers;
+    pub use core::marker as kinds;
+    pub use core::marker;
 }
 
 #[cfg(test)]
index 780e3da4684281eafc4999066a316d5ecced4fc3..3818ab45e06ee9c6a2c995266de06d3cb04cbf6c 100644 (file)
@@ -29,7 +29,7 @@
 use middle::ty::{MethodStatic, MethodStaticUnboxedClosure};
 use util::ppaux::Repr;
 
-use std::markers;
+use std::marker;
 use syntax::{ast, ast_util};
 use syntax::ptr::P;
 use syntax::codemap::Span;
@@ -135,7 +135,7 @@ enum TrackMatchMode<T> {
     Conflicting,
 }
 
-impl<T> markers::Copy for TrackMatchMode<T> {}
+impl<T> marker::Copy for TrackMatchMode<T> {}
 
 impl<T> TrackMatchMode<T> {
     // Builds up the whole match mode for a pattern from its constituent
index b73142b405147028ccb8d546e04921c0c7d081a9..59f53d5fb392287c1db94be2403aff1b4483c455 100644 (file)
@@ -10,7 +10,7 @@
 
 pub use self::VarValue::*;
 
-use std::markers;
+use std::marker;
 
 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: markers::CovariantType<K>,
+    marker: marker::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: markers::CovariantType::<K>,
+        Snapshot { marker: marker::CovariantType::<K>,
                    snapshot: self.values.start_snapshot() }
     }
 
index 62c46c435bc7ea693b7f699ac2a8dcef13bfa1b9..bf102acb8b12e16b2911419e88240cd33a661bbb 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::markers::InvariantType,
-    // std::markers::InvariantLifetime, and so on. The arrays
+    // These are the def-id of the std::marker::InvariantType,
+    // std::marker::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 ce9857f8243c803b307e2a884444e5747ca03a94..27ea2e895f645b17375c8d522b1267cfe4b21716 100644 (file)
@@ -21,7 +21,7 @@
 use fmt::{self, Show};
 use hash::{Hash, Hasher, RandomSipHasher};
 use iter::{self, Iterator, IteratorExt, FromIterator, Extend, Map};
-use markers::Sized;
+use marker::Sized;
 use mem::{self, replace};
 use num::{Int, UnsignedInt};
 use ops::{Deref, FnMut, Index, IndexMut};
index d67581a12b3ed0db9ddab6e903d290046b1c358b..5c9bbf1144c5db7c1724da8a0f93770dac1b94b9 100644 (file)
@@ -13,7 +13,7 @@
 use borrow::BorrowFrom;
 use clone::Clone;
 use cmp::{Eq, PartialEq};
-use core::markers::Sized;
+use core::marker::Sized;
 use default::Default;
 use fmt::Show;
 use fmt;
index cdfde1958c686a53d76a4127e174de39e8fd1625..6eb98da4da46e7c0223773cf4f88d8a3ee4ae436 100644 (file)
@@ -16,7 +16,7 @@
 use cmp;
 use hash::{Hash, Hasher};
 use iter::{Iterator, count};
-use markers::{Copy, Sized, self};
+use marker::{Copy, Sized, self};
 use mem::{min_align_of, size_of};
 use mem;
 use num::{Int, UnsignedInt};
@@ -72,7 +72,7 @@ pub struct RawTable<K, V> {
     hashes:   Unique<u64>,
     // Because K/V do not appear directly in any of the types in the struct,
     // inform rustc that in fact instances of K and V are reachable from here.
-    marker:   markers::CovariantType<(K,V)>,
+    marker:   marker::CovariantType<(K,V)>,
 }
 
 struct RawBucket<K, V> {
@@ -562,7 +562,7 @@ unsafe fn new_uninitialized(capacity: uint) -> RawTable<K, V> {
                 size: 0,
                 capacity: 0,
                 hashes: Unique::null(),
-                marker: markers::CovariantType,
+                marker: marker::CovariantType,
             };
         }
         // No need for `checked_mul` before a more restrictive check performed
@@ -601,7 +601,7 @@ unsafe fn new_uninitialized(capacity: uint) -> RawTable<K, V> {
             capacity: capacity,
             size:     0,
             hashes:   Unique(hashes),
-            marker:   markers::CovariantType,
+            marker:   marker::CovariantType,
         }
     }
 
@@ -651,7 +651,7 @@ fn raw_buckets(&self) -> RawBuckets<K, V> {
             hashes_end: unsafe {
                 self.hashes.0.offset(self.capacity as int)
             },
-            marker: markers::ContravariantLifetime,
+            marker: marker::ContravariantLifetime,
         }
     }
 
@@ -676,7 +676,7 @@ pub fn into_iter(self) -> IntoIter<K, V> {
             iter: RawBuckets {
                 raw: raw,
                 hashes_end: hashes_end,
-                marker: markers::ContravariantLifetime,
+                marker: marker::ContravariantLifetime,
             },
             table: self,
         }
@@ -689,7 +689,7 @@ pub fn drain(&mut self) -> Drain<K, V> {
             iter: RawBuckets {
                 raw: raw,
                 hashes_end: hashes_end,
-                marker: markers::ContravariantLifetime::<'static>,
+                marker: marker::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:     markers::ContravariantLifetime,
+            marker:     marker::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: markers::ContravariantLifetime<'a>,
+    marker: marker::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: markers::ContravariantLifetime,
+            marker: marker::ContravariantLifetime,
         }
     }
 }
@@ -754,7 +754,7 @@ struct RevMoveBuckets<'a, K, V> {
     raw: RawBucket<K, V>,
     hashes_end: *mut u64,
     elems_left: uint,
-    marker: markers::ContravariantLifetime<'a>,
+    marker: marker::ContravariantLifetime<'a>,
 }
 
 impl<'a, K, V> Iterator for RevMoveBuckets<'a, K, V> {
index 34facdc7de654d0e9c337c661f19fbc3d18056ff..69e7e429d07da01b5d7726415d17f08b1163d626 100644 (file)
@@ -63,7 +63,7 @@
 
 pub use core::hash::{Hash, Hasher, Writer, hash, sip};
 
-use core::markers::Sized;
+use core::marker::Sized;
 use default::Default;
 use rand::Rng;
 use rand;
index deae56d8a30d36d10ded7759ef5604529d73aba5..b9c7ab15313501b42d216f85c287bdd2447b35b3 100644 (file)
 use fmt;
 use int;
 use iter::{Iterator, IteratorExt};
-use markers::Sized;
+use marker::Sized;
 use mem::transmute;
 use ops::FnOnce;
 use option::Option;
index 43d37543e16a7f4b916ccea52f596d05819c8d55..ad3fb71d949bd36dc3e4a703f2a140b2b691bd4f 100644 (file)
@@ -34,7 +34,7 @@
 use fmt;
 use io::{Reader, Writer, IoResult, IoError, OtherIoError, Buffer,
          standard_error, EndOfFile, LineBufferedWriter, BufferedReader};
-use markers::{Sync, Send};
+use marker::{Sync, Send};
 use libc;
 use mem;
 use option::Option;
index b258c13f12e32fe37cb9618b3f4583f62969b1fd..dd4a0287ca65634bba23d2832c79bb765c5c6208 100644 (file)
 
 // Make std testable by not duplicating lang items. See #2912
 #[cfg(test)] extern crate "std" as realstd;
-#[cfg(test)] pub use realstd::markers;
+#[cfg(test)] pub use realstd::marker;
 #[cfg(test)] pub use realstd::ops;
 #[cfg(test)] pub use realstd::cmp;
 #[cfg(test)] pub use realstd::boxed;
 pub use core::finally;
 pub use core::intrinsics;
 pub use core::iter;
-#[cfg(stage0)] #[cfg(not(test))] pub use core::markers as kinds;
-#[cfg(not(test))] pub use core::markers;
+#[cfg(stage0)] #[cfg(not(test))] pub use core::marker as kinds;
+#[cfg(not(test))] pub use core::marker;
 pub use core::mem;
 #[cfg(not(test))] pub use core::ops;
 pub use core::ptr;
@@ -313,8 +313,8 @@ mod std {
     pub use cell; // used for tls!
     pub use thread_local; // used for thread_local!
     #[cfg(stage0)]
-    pub use markers as kinds;
-    pub use markers;  // used for tls!
+    pub use marker as kinds;
+    pub use marker;  // used for tls!
     pub use ops; // used for bitflags!
 
     // The test runner calls ::std::os::args() but really wants realstd
index cd78489cb85137aeb457f1a2370838839956fac3..f433cd1e664811947fd6b771e08962a53e7306cc 100644 (file)
@@ -19,7 +19,7 @@
 #[cfg(test)] use fmt::Show;
 use ops::{Add, Sub, Mul, Div, Rem, Neg};
 
-use markers::Copy;
+use marker::Copy;
 use clone::Clone;
 use cmp::{PartialOrd, PartialEq};
 
index 0e41d608086e9b9424fc0c48d1ab8fa2469c993c..2bc6d0869a5a810087873a6ee563b0d2bc2c85e2 100644 (file)
@@ -37,7 +37,7 @@
 use fmt;
 use io::{IoResult, IoError};
 use iter::{Iterator, IteratorExt};
-use markers::Copy;
+use marker::Copy;
 use libc::{c_void, c_int, c_char};
 use libc;
 use boxed::Box;
index e263761acd1c7df2784f8cf02491322757344b60..18b8d1d46aa831f779554cf8adb820df1612ab45 100644 (file)
@@ -61,7 +61,7 @@
 
 #![experimental]
 
-use core::markers::Sized;
+use core::marker::Sized;
 use ffi::CString;
 use clone::Clone;
 use fmt;
index 03811364d30c2b0275ce7d256fc0a41b6b2effd9..d8bb989e19f140a7b6baa94b6ccce80d65fb6fff 100644 (file)
@@ -16,7 +16,7 @@
 use io::Writer;
 use iter::{AdditiveIterator, Extend};
 use iter::{Iterator, IteratorExt, Map};
-use markers::Sized;
+use marker::Sized;
 use option::Option::{self, Some, None};
 use slice::{AsSlice, Split, SliceExt, SliceConcatExt};
 use str::{self, FromStr, StrExt};
index bf8d2a3d63b9cbf02b7d0450fb7fb164a1a94327..1aab52edd8e0ee75fbbaab5f5c9aa176fe2607fc 100644 (file)
@@ -13,7 +13,7 @@
 #![stable]
 
 // Reexported core operators
-#[stable] #[doc(no_inline)] pub use markers::{Copy, Send, Sized, Sync};
+#[stable] #[doc(no_inline)] pub use marker::{Copy, Send, Sized, Sync};
 #[stable] #[doc(no_inline)] pub use ops::{Drop, Fn, FnMut, FnOnce};
 
 // Reexported functions
index 512bd2a3d6e9b024e3fba7371b39cdef2a2c1ef3..a7d2fb169b6fcfa5239e48e0e00412d786272393 100644 (file)
@@ -185,7 +185,7 @@ mod imp {
     extern crate libc;
 
     use io::{IoResult};
-    use markers::Sync;
+    use marker::Sync;
     use mem;
     use os;
     use rand::Rng;
index 036bb7b637b679869ca37432f5af5a10eb332a8c..91d9ff46b8683d09d601b54b4bf6063ab072850b 100644 (file)
@@ -23,7 +23,7 @@
 
 #![allow(dead_code)]
 
-use markers::Send;
+use marker::Send;
 use ops::FnOnce;
 use sys;
 use thunk::Thunk;
index af6aa803f99695bd9ecc3742d36abb73fc375215..f174771a3e011527a03f052b4252c8705549cdbc 100644 (file)
@@ -13,8 +13,8 @@
 use thread::Thread;
 use sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering};
 use sync::Arc;
-use markers::{Sync, Send};
-use markers::{NoSend, NoSync};
+use marker::{Sync, Send};
+use marker::{NoSend, NoSync};
 use mem;
 use clone::Clone;
 
index 4d18d9e6e9d674879ea853745e320dcf952eee53..5dc58add665fddc7b3f0008cec548ce50758530e 100644 (file)
 
 use sync::Arc;
 use fmt;
-use markers;
+use marker;
 use mem;
 use cell::UnsafeCell;
 
@@ -373,7 +373,7 @@ unsafe impl<T:Send> Send for Sender<T> { }
 pub struct SyncSender<T> {
     inner: Arc<RacyCell<sync::Packet<T>>>,
     // can't share in an arc
-    _marker: markers::NoSync,
+    _marker: marker::NoSync,
 }
 
 /// An error returned from the `send` function on channels.
@@ -678,7 +678,7 @@ fn drop(&mut self) {
 
 impl<T: Send> SyncSender<T> {
     fn new(inner: Arc<RacyCell<sync::Packet<T>>>) -> SyncSender<T> {
-        SyncSender { inner: inner, _marker: markers::NoSync }
+        SyncSender { inner: inner, _marker: marker::NoSync }
     }
 
     /// Sends a value on this synchronous channel.
index ca7120b5ead8f0163728824365cde629d06a337a..b7bb22b3ef3147ea94304e90554b1752ae8643da 100644 (file)
@@ -57,7 +57,7 @@
 use core::prelude::*;
 
 use core::cell::Cell;
-use core::markers;
+use core::marker;
 use core::mem;
 use core::uint;
 
@@ -70,7 +70,7 @@ pub struct Select {
     head: *mut Handle<'static, ()>,
     tail: *mut Handle<'static, ()>,
     next_id: Cell<uint>,
-    marker1: markers::NoSend,
+    marker1: marker::NoSend,
 }
 
 /// A handle to a receiver which is currently a member of a `Select` set of
@@ -115,7 +115,7 @@ impl Select {
     /// rather much easier through the `select!` macro.
     pub fn new() -> Select {
         Select {
-            marker1: markers::NoSend,
+            marker1: marker::NoSend,
             head: 0 as *mut Handle<'static, ()>,
             tail: 0 as *mut Handle<'static, ()>,
             next_id: Cell::new(1),
index bb5a633764690855af810152c5198bc88f6c2ff0..9756d08619356a66aa7eccd4f1774a27eec934b1 100644 (file)
@@ -11,7 +11,7 @@
 use prelude::v1::*;
 
 use cell::UnsafeCell;
-use markers;
+use marker;
 use ops::{Deref, DerefMut};
 use sync::poison::{self, TryLockError, TryLockResult, LockResult};
 use sys_common::mutex as sys;
@@ -166,7 +166,7 @@ pub struct MutexGuard<'a, T: 'a> {
     __lock: &'a StaticMutex,
     __data: &'a UnsafeCell<T>,
     __poison: poison::Guard,
-    __marker: markers::NoSend,
+    __marker: marker::NoSend,
 }
 
 /// Static initialization of a mutex. This constant can be used to initialize
@@ -286,7 +286,7 @@ fn new(lock: &'mutex StaticMutex, data: &'mutex UnsafeCell<T>)
                 __lock: lock,
                 __data: data,
                 __poison: guard,
-                __marker: markers::NoSend,
+                __marker: marker::NoSend,
             }
         })
     }
index 11a5cad2c25f117936acce252fc81286824fba08..15ca4783700f09fcb706c972915e7a3ea14f0832 100644 (file)
@@ -14,7 +14,7 @@
 //! example use case would be for initializing an FFI library.
 
 use int;
-use markers::Sync;
+use marker::Sync;
 use mem::drop;
 use ops::FnOnce;
 use sync::atomic::{AtomicInt, Ordering, ATOMIC_INT_INIT};
index f40c0cc0c0e53fbf113731ee955741a84f663657..36f9d4228b351bc1ca9e89b5ee6695103e26655a 100644 (file)
@@ -11,7 +11,7 @@
 use prelude::v1::*;
 
 use cell::UnsafeCell;
-use markers;
+use marker;
 use ops::{Deref, DerefMut};
 use sync::poison::{self, LockResult, TryLockError, TryLockResult};
 use sys_common::rwlock as sys;
@@ -113,7 +113,7 @@ unsafe impl Sync for StaticRwLock {}
 pub struct RwLockReadGuard<'a, T: 'a> {
     __lock: &'a StaticRwLock,
     __data: &'a UnsafeCell<T>,
-    __marker: markers::NoSend,
+    __marker: marker::NoSend,
 }
 
 /// RAII structure used to release the exclusive write access of a lock when
@@ -124,7 +124,7 @@ pub struct RwLockWriteGuard<'a, T: 'a> {
     __lock: &'a StaticRwLock,
     __data: &'a UnsafeCell<T>,
     __poison: poison::Guard,
-    __marker: markers::NoSend,
+    __marker: marker::NoSend,
 }
 
 impl<T: Send + Sync> RwLock<T> {
@@ -309,7 +309,7 @@ fn new(lock: &'rwlock StaticRwLock, data: &'rwlock UnsafeCell<T>)
             RwLockReadGuard {
                 __lock: lock,
                 __data: data,
-                __marker: markers::NoSend,
+                __marker: marker::NoSend,
             }
         })
     }
@@ -322,7 +322,7 @@ fn new(lock: &'rwlock StaticRwLock, data: &'rwlock UnsafeCell<T>)
                 __lock: lock,
                 __data: data,
                 __poison: guard,
-                __marker: markers::NoSend,
+                __marker: marker::NoSend,
             }
         })
     }
index b86e6ce254a535b2dc27af80c6085e33d017ee01..9aea0fb3b31725f8743949065b48cc1c333ab8d5 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use markers::Sync;
+use marker::Sync;
 use sys::mutex as imp;
 
 /// An OS-based mutual exclusion lock.
index 968347bbfbcb1504d4ce7162d90c44a24ad555dd..cc661877bc01e4c5847d744a06662542ef47fb90 100644 (file)
@@ -165,8 +165,8 @@ pub struct sigaction {
         sa_restorer: *mut libc::c_void,
     }
 
-    unsafe impl ::markers::Send for sigaction { }
-    unsafe impl ::markers::Sync for sigaction { }
+    unsafe impl ::marker::Send for sigaction { }
+    unsafe impl ::marker::Sync for sigaction { }
 
     #[repr(C)]
     #[cfg(target_word_size = "32")]
@@ -217,8 +217,8 @@ pub struct sigaction {
         sa_resv: [libc::c_int; 1],
     }
 
-    unsafe impl ::markers::Send for sigaction { }
-    unsafe impl ::markers::Sync for sigaction { }
+    unsafe impl ::marker::Send for sigaction { }
+    unsafe impl ::marker::Sync for sigaction { }
 
     #[repr(C)]
     pub struct sigset_t {
index 8da25c7880dfd4c058406cf68e2b4f9f4d2f1dfb..ada8a7f2349bb6992de620e3c35bbc1cfbb31407 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use cell::UnsafeCell;
-use markers::Sync;
+use marker::Sync;
 use sys::sync as ffi;
 use sys_common::mutex;
 
index 630087e2291a52fe43fc1fb12c61d6a933396f65..43abd96e46d1bd4f1720fbf5e39df86f4326215f 100644 (file)
 use boxed::Box;
 use cell::UnsafeCell;
 use clone::Clone;
-use markers::{Send, Sync};
+use marker::{Send, Sync};
 use ops::{Drop, FnOnce};
 use option::Option::{self, Some, None};
 use result::Result::{Err, Ok};
index bf01b578b1fb797eda50c6f13e13864e99619674..15b98e1aff09e0bfe2b0132ef5ef20d1ab225e97 100644 (file)
@@ -346,7 +346,7 @@ pub struct Key<T> {
         pub dtor_running: UnsafeCell<bool>, // should be Cell
     }
 
-    unsafe impl<T> ::markers::Sync for Key<T> { }
+    unsafe impl<T> ::marker::Sync for Key<T> { }
 
     #[doc(hidden)]
     impl<T> Key<T> {
@@ -472,7 +472,7 @@ pub struct Key<T> {
         pub os: OsStaticKey,
     }
 
-    unsafe impl<T> ::markers::Sync for Key<T> { }
+    unsafe impl<T> ::marker::Sync for Key<T> { }
 
     struct Value<T: 'static> {
         key: &'static Key<T>,
index a643d2cb8ee36e9cf724e4d27153faa6872cf279..1fb5652bc0ca4c082e0b754a37d8046a10523a0e 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::markers::InvariantType,
+                marker: ::std::marker::InvariantType,
             }
         };
 
@@ -211,7 +211,7 @@ mod imp {
     #[doc(hidden)]
     pub struct KeyInner<T> { pub inner: UnsafeCell<*mut T> }
 
-    unsafe impl<T> ::markers::Sync for KeyInner<T> { }
+    unsafe impl<T> ::marker::Sync for KeyInner<T> { }
 
     #[doc(hidden)]
     impl<T> KeyInner<T> {
@@ -224,16 +224,16 @@ 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 markers;
+    use marker;
     use sys_common::thread_local::StaticKey as OsStaticKey;
 
     #[doc(hidden)]
     pub struct KeyInner<T> {
         pub inner: OsStaticKey,
-        pub marker: markers::InvariantType<T>,
+        pub marker: marker::InvariantType<T>,
     }
 
-    unsafe impl<T> ::markers::Sync for KeyInner<T> { }
+    unsafe impl<T> ::marker::Sync for KeyInner<T> { }
 
     #[doc(hidden)]
     impl<T> KeyInner<T> {
index ec9dd86f941076cca4b80d96cefd1cda2a2afc63..1830a4df54aab8c9b12baadc4e770ee37439aaf1 100644 (file)
@@ -12,7 +12,7 @@
 #![allow(missing_docs)]
 
 use alloc::boxed::Box;
-use core::markers::Send;
+use core::marker::Send;
 use core::ops::FnOnce;
 
 pub struct Thunk<A=(),R=()> {
index 50c91c133437d6569f493f9bbf08cbc74896a958..b4c171388db05c364e9201f920ce06d627c83970 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", "markers", name)),
+        path: Path::new(vec!("std", "marker", name)),
         additional_bounds: Vec::new(),
         generics: LifetimeBounds::empty(),
         methods: vec!()
index 094d45a10d166ce235f04bd913e5dc92533099bf..3f089d62e4ee527013505189cec1dad0c2dc47cd 100644 (file)
@@ -7801,7 +7801,7 @@ pub fn width(c: char, is_cjk: bool) -> Option<uint> {
 }
 
 pub mod grapheme {
-    use core::markers::Copy;
+    use core::marker::Copy;
     use core::slice::SliceExt;
     pub use self::GraphemeCat::*;
     use core::result::Result::{Ok, Err};
index 28483abda3cfe5a0f0c153c06e0890272c487d4b..e4b97ab5933cebe0bb2451a7f4fe0c6b9ffa49d3 100644 (file)
@@ -14,7 +14,7 @@ trait Get {
 }
 
 fn foo<T:Get>(t: T) {
-    let x = t.get(); //~ ERROR the trait `core::markers::Sized` is not implemented
+    let x = t.get(); //~ ERROR the trait `core::marker::Sized` is not implemented
 }
 
 fn main() {
index 33907dc4c4667a04c71e6bb017056d84ba2f49a6..349c33a30a53196c3a01ffa02e2bdd2d6e60d749 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 fn foo<T:'static>() {
-    1u.bar::<T>(); //~ ERROR `core::markers::Send` is not implemented
+    1u.bar::<T>(); //~ ERROR `core::marker::Send` is not implemented
 }
 
 trait bar {
index 6e8fcba8c8a15fbe36c2b517234a989e0dc67860..69be6414e4c90e09657aba9d102e4dbf8f3ad69c 100644 (file)
@@ -16,8 +16,8 @@ trait Trait {}
 
 pub fn main() {
     let x: Vec<Trait + Sized> = Vec::new();
-    //~^ ERROR the trait `core::markers::Sized` is not implemented
-    //~^^ ERROR the trait `core::markers::Sized` is not implemented
+    //~^ ERROR the trait `core::marker::Sized` is not implemented
+    //~^^ ERROR the trait `core::marker::Sized` is not implemented
     let x: Vec<Box<RefCell<Trait + Sized>>> = Vec::new();
-    //~^ ERROR the trait `core::markers::Sized` is not implemented
+    //~^ ERROR the trait `core::marker::Sized` is not implemented
 }
index 310da28dd4963757c47d91f57f379347c22be9e7..730a0c3e235455f92dbdd42004665b2120ee20c0 100644 (file)
 
 // Ensure that moves out of static items is forbidden
 
-use std::markers;
+use std::marker;
 
 struct Foo {
     foo: int,
-    nocopy: markers::NoCopy
+    nocopy: marker::NoCopy
 }
 
-static BAR: Foo = Foo{foo: 5, nocopy: markers::NoCopy};
+static BAR: Foo = Foo{foo: 5, nocopy: marker::NoCopy};
 
 
 fn test(f: Foo) {
index 36d430ddeaa630569631628307b722c0141d9537..98a29f01faf1c486846e04ce6ac5d300c8568c98 100644 (file)
@@ -12,7 +12,7 @@
 // move, when the struct implements Drop.
 
 // NoCopy
-use std::markers::NoCopy as NP;
+use std::marker::NoCopy as NP;
 
 
 struct S { a: int, np: NP }
index 03c1aa2a05d683fbbbb5a07b5e477e056f516327..cd215a7373780170e02eed6cb3e3aaf30ac787b6 100644 (file)
@@ -13,9 +13,9 @@
 
 trait Foo : Send+Sync { }
 
-impl <T: Sync+'static> Foo for (T,) { } //~ ERROR the trait `core::markers::Send` is not implemented
+impl <T: Sync+'static> Foo for (T,) { } //~ ERROR the trait `core::marker::Send` is not implemented
 
-impl <T: Send> Foo for (T,T) { } //~ ERROR the trait `core::markers::Sync` is not implemented
+impl <T: Send> Foo for (T,T) { } //~ ERROR the trait `core::marker::Sync` is not implemented
 
 impl <T: Send+Sync> Foo for (T,T,T) { } // (ok)
 
index 1fa663640d869d931b9e0acd1592159a87b5f2b6..138fcfa8b64fe06c1ce668c766e77c89b24acf0c 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::markers::Send` is not implemented
+//~^ ERROR the trait `core::marker::Send` is not implemented
 
 fn main() { }
index 2c295768e7ad50187378d2ea0ff532e826092f86..534bb6d37ec39104bdb35d53ee08069c01c74e0c 100644 (file)
@@ -12,6 +12,6 @@
 
 trait Foo : Send { }
 
-impl <T: Sync+'static> Foo for T { } //~ ERROR the trait `core::markers::Send` is not implemented
+impl <T: Sync+'static> Foo for T { } //~ ERROR the trait `core::marker::Send` is not implemented
 
 fn main() { }
index 8b7d2457d3cdc10787bab93b257dd317c3cef456..1c7ae05961e66bf373b8650e911b308d328ba6b5 100644 (file)
@@ -10,7 +10,7 @@
 
 // Verifies all possible restrictions for statics values.
 
-use std::markers;
+use std::marker;
 
 struct WithDtor;
 
index a02d6b7f5173acc3ea6b4f4f36b03baf020f4c02..b88040cbd54a622ec02a824f06b775e286119b8c 100644 (file)
@@ -13,7 +13,7 @@ struct X<F> where F: FnOnce() + 'static + Send {
 }
 
 fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
-    //~^ ERROR the trait `core::kinds::Send` is not implemented for the type
+    //~^ ERROR the trait `core::marker::Send` is not implemented for the type
     return X { field: blk };
 }
 
index 509fffc5c9a882e2806b64b587fbf15d1c73e7e5..fadaa84f19db535b6ef5096b9bc0d6dbc23f1aea 100644 (file)
@@ -21,7 +21,7 @@ fn give_any<F>(f: F) where F: FnOnce() {
 
 fn give_owned<F>(f: F) where F: FnOnce() + Send {
     take_any(f);
-    take_const_owned(f); //~ ERROR the trait `core::kinds::Sync` is not implemented for the type
+    take_const_owned(f); //~ ERROR the trait `core::marker::Sync` is not implemented for the type
 }
 
 fn main() {}
index 5dce6ba81333b054ce8724bb29912bdf5e104eda..a7962c09fb3b96a447ee95a1925cfe8b439eeea2 100644 (file)
@@ -13,5 +13,5 @@
 fn test<T: Sync>() {}
 
 fn main() {
-    test::<Receiver<int>>();   //~ ERROR: `core::markers::Sync` is not implemented
+    test::<Receiver<int>>();   //~ ERROR: `core::marker::Sync` is not implemented
 }
index 0f34ccf4a523a4fa5abd45011edab599e5c80e1d..1977438d42320d94842fc9e37d95602a26d5b159 100644 (file)
@@ -13,5 +13,5 @@
 fn test<T: Sync>() {}
 
 fn main() {
-    test::<Sender<int>>();     //~ ERROR: `core::markers::Sync` is not implemented
+    test::<Sender<int>>();     //~ ERROR: `core::marker::Sync` is not implemented
 }
index b9c06c60a5dcbe1c22d8b9dc6ed9e2f3e4cef3fb..ebd0ee97efec4840196caf65991cfdf2d2737f21 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::markers::Sized` is not implemented
+    //~^ ERROR the trait `core::marker::Sized` is not implemented
 }
index 2516d9874550ffe86308a688b155cef30d254f18..f52c990ca52eb8081f192184423f162644dd4fd3 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::markers::Sized` is not implemented for the type `ToBar`
+    //~^ ERROR the trait `core::marker::Sized` is not implemented for the type `ToBar`
 }
index ed2ccc9d9cc4254443479c496bb3392f1d5b1e94..0276e2e418df852b55e5e7d66ac9302714dab491 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::markers::Sized` is not implemented
+    //~^ ERROR the trait `core::marker::Sized` is not implemented
 }
index b28952d2b330e2654b69c6552fc3cf568e54a7d0..87ff4291f50e2d8f3ad951f338b8452508f189e1 100644 (file)
@@ -15,22 +15,22 @@ impl Foo for str {}
 
 fn test1<T: ?Sized + Foo>(t: &T) {
     let u: &Foo = t;
-    //~^ ERROR `core::markers::Sized` is not implemented for the type `T`
+    //~^ ERROR `core::marker::Sized` is not implemented for the type `T`
 }
 
 fn test2<T: ?Sized + Foo>(t: &T) {
     let v: &Foo = t as &Foo;
-    //~^ ERROR `core::markers::Sized` is not implemented for the type `T`
+    //~^ ERROR `core::marker::Sized` is not implemented for the type `T`
 }
 
 fn test3() {
     let _: &[&Foo] = &["hi"];
-    //~^ ERROR `core::markers::Sized` is not implemented for the type `str`
+    //~^ ERROR `core::marker::Sized` is not implemented for the type `str`
 }
 
 fn test4() {
     let _: &Foo = "hi" as &Foo;
-    //~^ ERROR `core::markers::Sized` is not implemented for the type `str`
+    //~^ ERROR `core::marker::Sized` is not implemented for the type `str`
 }
 
 fn main() { }
index af0b780b3b779e1f4a5382d9c81c1c56383f6fd5..d68d6676515d0453221934976189099e11a137cb 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::markers::Sized` is not implemented for the type `[int]`
+//~^ ERROR the trait `core::marker::Sized` is not implemented for the type `[int]`
 
 impl Foo<int> for [uint] { }
-//~^ ERROR the trait `core::markers::Sized` is not implemented for the type `[uint]`
+//~^ ERROR the trait `core::marker::Sized` is not implemented for the type `[uint]`
 
 pub fn main() { }
index 581a06db7451aad818765b24aaa6e5076dcd1bc5..d79b3f472d06b70bd53436e6990058290ae86071 100644 (file)
@@ -13,5 +13,5 @@
 fn check_bound<T:Copy>(_: T) {}
 
 fn main() {
-    check_bound("nocopy".to_string()); //~ ERROR the trait `core::markers::Copy` is not implemented
+    check_bound("nocopy".to_string()); //~ ERROR the trait `core::marker::Copy` is not implemented
 }
index d9b8c4db031d087894f9fea5a4f4af7ef2db0e3f..c7cac71af036125ded2fdda44ffebcb7497a4610 100644 (file)
@@ -10,5 +10,5 @@
 
 fn main() {
     let _x = "test" as &::std::any::Any;
-//~^ ERROR the trait `core::markers::Sized` is not implemented for the type `str`
+//~^ ERROR the trait `core::marker::Sized` is not implemented for the type `str`
 }
index 5e305313fcf9bf289964154656c9de7aca349eba..c2d30224dc87f8b8f2ce045754523a41d20c038a 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::markers::Sized` is not implemented for the type `[T]`
+//~^ ERROR the trait `core::marker::Sized` is not implemented for the type `[T]`
     in arg2
     {
     }
index 505a59b484db82dbeba741e45595b18ce69081d3..af686b8681316f6dcddd5d03316d7ce77eba23dd 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::markers::Sync` is not implemented for the type
+//~| ERROR: the trait `core::marker::Sync` is not implemented for the type
 
 fn main() {}
index 730344f5763ccda985593ee1f517b965d848b797..4f3668b819a589046595ea778df079ee4b39eed3 100644 (file)
@@ -8,10 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::markers;
+use std::marker;
 
-struct Foo { nc: markers::NoCopy }
-const INIT: Foo = Foo { nc: markers::NoCopy };
+struct Foo { nc: marker::NoCopy }
+const INIT: Foo = Foo { nc: marker::NoCopy };
 static FOO: Foo = INIT;
 
 fn main() {
index da343cc81ac668a7f5b080aa54684df48bf26696..147bff2e9777ef835e0b38dc34b77e6f0cd9bfd8 100644 (file)
@@ -8,12 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::markers;
+use std::marker;
 
-struct Foo { marker: markers::NoSync }
+struct Foo { marker: marker::NoSync }
 
 static FOO: uint = 3;
-static BAR: Foo = Foo { marker: markers::NoSync };
-//~^ ERROR: the trait `core::markers::Sync` is not implemented
+static BAR: Foo = Foo { marker: marker::NoSync };
+//~^ ERROR: the trait `core::marker::Sync` is not implemented
 
 fn main() {}
index a17b2ee0c68a215439975591663f9c88e1fbc62e..b8249ebd4792cc118e2709ec18d70cabca651119 100644 (file)
@@ -14,7 +14,7 @@ pub trait AbstractRenderer {}
 
 fn _create_render(_: &()) ->
     AbstractRenderer
-//~^ ERROR: the trait `core::markers::Sized` is not implemented
+//~^ ERROR: the trait `core::marker::Sized` is not implemented
 {
     match 0u {
         _ => unimplemented!()
index b9fbc37828f6b32e15039ca610119ff082f0e976..bbc5ee6c8f36e336e453eb9c0920de56faf1e0fb 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::markers::Sized` is not implemented
+        //~^ error: the trait `core::marker::Sized` is not implemented
     ) ->
         <Dst as From<Self>>::Dst
-        //~^ error: the trait `core::markers::Sized` is not implemented
+        //~^ error: the trait `core::marker::Sized` is not implemented
     {
         From::from(
-            //~^ error: the trait `core::markers::Sized` is not implemented
+            //~^ error: the trait `core::marker::Sized` is not implemented
             self
         )
     }
index 8076df39db9a40a558cea4493015811ba46eadba..d91479a2e4e896169cb34c90d2624b69d06e589e 100644 (file)
@@ -16,9 +16,9 @@ trait From<Src> {
 
 trait To {
     fn to<Dst>(
-        self //~ error: the trait `core::markers::Sized` is not implemented
+        self //~ error: the trait `core::marker::Sized` is not implemented
     ) -> <Dst as From<Self>>::Result where Dst: From<Self> {
-        From::from( //~ error: the trait `core::markers::Sized` is not implemented
+        From::from( //~ error: the trait `core::marker::Sized` is not implemented
             self
         )
     }
index da60fee65c6ab6db758ecd18df7e584b1302d0f1..546b808a38f4725e5f6eae200f7d81bcc2d8b104 100644 (file)
@@ -17,6 +17,6 @@ struct S {
     name: int
 }
 
-fn bar(_x: Foo) {} //~ ERROR the trait `core::markers::Sized` is not implemented
+fn bar(_x: Foo) {} //~ ERROR the trait `core::marker::Sized` is not implemented
 
 fn main() {}
index 05073927beb62899783a821d1fad5174d556f6b4..9e324cdd61eb0e82f40308131b51c72d1d1ce360 100644 (file)
@@ -11,6 +11,6 @@
 trait I {}
 type K = I+'static;
 
-fn foo(_x: K) {} //~ ERROR: the trait `core::markers::Sized` is not implemented
+fn foo(_x: K) {} //~ ERROR: the trait `core::marker::Sized` is not implemented
 
 fn main() {}
index 6981c4451ca13819892b021528d298e869c06670..2d64013dc277f692cbe6724b6dcf7604049d36fa 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::markers::Sized` is not implemented for the type `Foo`
+    //~^ ERROR `core::marker::Sized` is not implemented for the type `Foo`
 }
index 2f601a8ba58bbda26fbaf57baab11260a2d8236f..9ff957b6e6deac4904d0d5066390bd4dd53e2803 100644 (file)
@@ -15,8 +15,8 @@ struct Struct {
 }
 
 fn new_struct(r: A+'static)
-    -> Struct { //~^  ERROR the trait `core::markers::Sized` is not implemented
-    //~^ ERROR the trait `core::markers::Sized` is not implemented
+    -> Struct { //~^  ERROR the trait `core::marker::Sized` is not implemented
+    //~^ ERROR the trait `core::marker::Sized` is not implemented
     Struct { r: r }
 }
 
index 30a59c52faa8cfbdf8cb368e537e96704d538e2b..d2f9ee4760303484e6bdfb88479311f67e3d1cba 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::markers::Send` is not implemented
-    //~^^ ERROR the trait `core::markers::Send` is not implemented
+    //~^ ERROR the trait `core::marker::Send` is not implemented
+    //~^^ ERROR the trait `core::marker::Send` is not implemented
 }
index c4217029a9343886379af44eba9ee73fc0798b44..c8c7ef4ed89d767f97cd5f1f2bfc243adfc5905f 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::markers::Sync` is not implemented for the type
-//~| ERROR: the trait `core::markers::Sync` is not implemented for the type
+//~| ERROR: the trait `core::marker::Sync` is not implemented for the type
+//~| ERROR: the trait `core::marker::Sync` is not implemented for the type
 
 fn main() { }
index 583fbedfcbc519320bdd6e03444dbf86ecedcfbf..ac088e69a28e52d15c3c7b1160615e9ff91b4ce9 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::markers::Copy` is not implemented
-    assert_copy::<&'a mut int>();  //~ ERROR `core::markers::Copy` is not implemented
+    assert_copy::<&'static mut int>(); //~ ERROR `core::marker::Copy` is not implemented
+    assert_copy::<&'a mut int>();  //~ ERROR `core::marker::Copy` is not implemented
 
     // ~ pointers are not ok
-    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
+    assert_copy::<Box<int>>();   //~ ERROR `core::marker::Copy` is not implemented
+    assert_copy::<String>();   //~ ERROR `core::marker::Copy` is not implemented
+    assert_copy::<Vec<int> >(); //~ ERROR `core::marker::Copy` is not implemented
+    assert_copy::<Box<&'a mut int>>(); //~ ERROR `core::marker::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::markers::Copy` is not implemented
-    assert_copy::<Box<Dummy+Copy>>(); //~ ERROR `core::markers::Copy` is not implemented
+    assert_copy::<Box<Dummy>>(); //~ ERROR `core::marker::Copy` is not implemented
+    assert_copy::<Box<Dummy+Copy>>(); //~ ERROR `core::marker::Copy` is not implemented
 
     // mutable object types are not ok
-    assert_copy::<&'a mut (Dummy+Copy)>();  //~ ERROR `core::markers::Copy` is not implemented
+    assert_copy::<&'a mut (Dummy+Copy)>();  //~ ERROR `core::marker::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::markers::Copy` is not implemented
+    assert_copy::<MyNoncopyStruct>(); //~ ERROR `core::marker::Copy` is not implemented
 
     // ref counted types are not ok
-    assert_copy::<Rc<int>>();   //~ ERROR `core::markers::Copy` is not implemented
+    assert_copy::<Rc<int>>();   //~ ERROR `core::marker::Copy` is not implemented
 }
 
 pub fn main() {
index 2ec22ceb63fd7430fee7f029e18e9b968c59b6c9..9e7c983195a6629a27458806c40483c798e5c469 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::markers::Copy` is not implemented
+    //~^ ERROR the trait `core::marker::Copy` is not implemented
 }
index ad62fd9856050aecb05a17ef20b9496ee424f5af..6ecf2593d00ab4b67354c6bf5eaf623a7e2d5e44 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::markers::Send` is not implemented
-    //~^^ ERROR the trait `core::markers::Copy` is not implemented
+    //~^ ERROR the trait `core::marker::Send` is not implemented
+    //~^^ ERROR the trait `core::marker::Copy` is not implemented
 }
 
 fn g<T>(val: T) {
     let t: S<T> = S;
     let a: &Gettable<T> = &t;
-    //~^ ERROR the trait `core::markers::Send` is not implemented
-    //~^^ ERROR the trait `core::markers::Copy` is not implemented
+    //~^ ERROR the trait `core::marker::Send` is not implemented
+    //~^^ ERROR the trait `core::marker::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::markers::Copy` is not implemented
+    //~^ ERROR the trait `core::marker::Copy` is not implemented
 }
 
 fn foo3<'a>() {
     let t: Box<S<String>> = box S;
     let a: Box<Gettable<String>> = t;
-    //~^ ERROR the trait `core::markers::Copy` is not implemented
+    //~^ ERROR the trait `core::marker::Copy` is not implemented
 }
 
 fn main() { }
index 238f495187c5ee2f2b8e6338aae1f3927adb7022..7f610176b65695e086e898bcf3b3d4a763a95d32 100644 (file)
@@ -22,13 +22,13 @@ fn take_param<T:Foo>(foo: &T) { }
 
 fn a() {
     let x = box 3i;
-    take_param(&x); //~ ERROR `core::markers::Copy` is not implemented
+    take_param(&x); //~ ERROR `core::marker::Copy` is not implemented
 }
 
 fn b() {
     let x = box 3i;
     let y = &x;
-    let z = &x as &Foo; //~ ERROR `core::markers::Copy` is not implemented
+    let z = &x as &Foo; //~ ERROR `core::marker::Copy` is not implemented
 }
 
 fn main() { }
index b46f91413a41caca5e2964991f2dd1eb39a0a678..a13a3f7c4ab71e56fd317e45181467ab1fb38f4a 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::markers::Send` is not implemented
-    //~^^ ERROR `core::markers::Send` is not implemented
+    //~^ ERROR `core::marker::Send` is not implemented
+    //~^^ ERROR `core::marker::Send` is not implemented
 }
 
index 1235a0a1228df4c7f0591e8f4529430e023c0f0b..7984b3b32c21391abf3ca09b47295a0e80d53b99 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::markers::Send` is not implemented
+    //~^ ERROR the trait `core::marker::Send` is not implemented
 }
 
 fn box_object_with_no_bound_not_ok<'a>() {
-    assert_send::<Box<Dummy>>(); //~ ERROR the trait `core::markers::Send` is not implemented
+    assert_send::<Box<Dummy>>(); //~ ERROR the trait `core::marker::Send` is not implemented
 }
 
 fn object_with_send_bound_ok() {
index 4f1a95859ae6f962aa08192f4823f2e603cb34d9..c781fffff2dbcb760d1be992b91d6f6bc1a9e04e 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::markers::Send` is not implemented
+    //~^ ERROR the trait `core::marker::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::markers::Send` is not implemented
+    //~^ ERROR the trait `core::marker::Send` is not implemented
 }
 
 fn main() { }
index 06b8cf20258fc66fdf5bc04de70800a7f2a561fe..75bae09b37f17cad3f3961e06a64230970263c91 100644 (file)
@@ -14,11 +14,11 @@ fn assert_send<T:Send>() { }
 trait Dummy { }
 
 fn test50() {
-    assert_send::<&'static Dummy>(); //~ ERROR the trait `core::markers::Send` is not implemented
+    assert_send::<&'static Dummy>(); //~ ERROR the trait `core::marker::Send` is not implemented
 }
 
 fn test53() {
-    assert_send::<Box<Dummy>>(); //~ ERROR the trait `core::markers::Send` is not implemented
+    assert_send::<Box<Dummy>>(); //~ ERROR the trait `core::marker::Send` is not implemented
 }
 
 // ...unless they are properly bounded
index 0a2f4cbce8505c3bb841e79c48180fcc96c95a87..1bfd0d4a11f55548dc3d35d3887c75892754d089 100644 (file)
@@ -14,7 +14,7 @@ fn assert_send<T:Send>() { }
 
 fn test71<'a>() {
     assert_send::<*mut &'a int>();
-    //~^ ERROR the trait `core::markers::Send` is not implemented for the type
+    //~^ ERROR the trait `core::marker::Send` is not implemented for the type
 }
 
 fn main() {
index 3bdc44ec3638095ea315a9c4297da7027116b4cb..21e1ab4c33e1de6c5d5a0d068fc7a865f58ae0bf 100644 (file)
@@ -19,7 +19,7 @@
 struct Foo {
     x: uint,
     b: bool, //~ ERROR: struct field is never used
-    marker: std::markers::NoCopy
+    marker: std::marker::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::markers::NoCopy });
+    field_read(Foo { x: 1, b: false, marker: std::marker::NoCopy });
     field_match_in_patterns(XYZ::Z);
     field_match_in_let(Bar { x: 42u, b: true, _guard: () });
     let _ = Baz { x: 0 };
index e329cdc32d3ded0571efdc40f4e9f4ffe2959896..d9e139cc9db71d86b6715fb61f67034dfc9679f0 100644 (file)
@@ -8,11 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::markers;
+use std::marker;
 
 fn foo<P:Copy>(p: P) { }
 
 fn main()
 {
-    foo(markers::NoCopy); //~ ERROR the trait `core::markers::Copy` is not implemented
+    foo(marker::NoCopy); //~ ERROR the trait `core::marker::Copy` is not implemented
 }
index dcbe63a417d3712d89e4da81471a79d125ee8996..032718d7e9a10a6db71cdc4147b997053a70030e 100644 (file)
@@ -8,11 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::markers;
+use std::marker;
 
 fn foo<P:Send>(p: P) { }
 
 fn main()
 {
-    foo(markers::NoSend); //~ ERROR the trait `core::markers::Send` is not implemented
+    foo(marker::NoSend); //~ ERROR the trait `core::marker::Send` is not implemented
 }
index 77d5fc23a3535f617ae3fdfa07a2b5df8db87f19..b29f7fab2ccfc25409fabcd4b2be7e7715fd6e6d 100644 (file)
@@ -8,11 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::markers;
+use std::marker;
 
 fn foo<P: Sync>(p: P) { }
 
 fn main()
 {
-    foo(markers::NoSync); //~ ERROR the trait `core::markers::Sync` is not implemented
+    foo(marker::NoSync); //~ ERROR the trait `core::marker::Sync` is not implemented
 }
index 711763c20c6d0b6b836ed07bdf3fd1f769f33e79..d7529c86aa528ef791db9b665f4e50b6708beb1c 100644 (file)
@@ -15,6 +15,6 @@ fn f<T: Sync>(_: T) {}
 fn main() {
     let x = RefCell::new(0i);
     f(x);
-    //~^ ERROR `core::markers::Sync` is not implemented
-    //~^^ ERROR `core::markers::Sync` is not implemented
+    //~^ ERROR `core::marker::Sync` is not implemented
+    //~^^ ERROR `core::marker::Sync` is not implemented
 }
index 01c977dc62c894509eca57c0a6e6630e60c6fdb8..f90bb610d374178c87c5b27d0243ccf97f6fb8fc 100644 (file)
 // Tests that an `&` pointer to something inherently mutable is itself
 // to be considered mutable.
 
-use std::markers;
+use std::marker;
 
-enum Foo { A(markers::NoSync) }
+enum Foo { A(marker::NoSync) }
 
 fn bar<T: Sync>(_: T) {}
 
 fn main() {
-    let x = Foo::A(markers::NoSync);
-    bar(&x); //~ ERROR the trait `core::markers::Sync` is not implemented
+    let x = Foo::A(marker::NoSync);
+    bar(&x); //~ ERROR the trait `core::marker::Sync` is not implemented
 }
index 66082d4654932a2f800437041d0cd4331bc4f4e2..0b0a83a41966db61860d2cf1fddd9906a5141534 100644 (file)
@@ -36,8 +36,8 @@ fn foo(x: Port<()>) -> foo {
     let x = foo(Port(Rc::new(())));
 
     Thread::spawn(move|| {
-        //~^ ERROR `core::markers::Send` is not implemented
-        //~^^ ERROR `core::markers::Send` is not implemented
+        //~^ ERROR `core::marker::Send` is not implemented
+        //~^^ ERROR `core::marker::Send` is not implemented
         let y = x;
         println!("{}", y);
     });
index 2a0ffd932085af01673b5859cd9bfdff00439e4f..cf1f13e8bb8683d1eb28f312518b7495dacea205 100644 (file)
@@ -8,16 +8,16 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::markers;
+use std::marker;
 
 enum Foo {
-    A(markers::NoSend)
+    A(marker::NoSend)
 }
 
 fn bar<T: Send>(_: T) {}
 
 fn main() {
-    let x = Foo::A(markers::NoSend);
+    let x = Foo::A(marker::NoSend);
     bar(x);
-    //~^ ERROR `core::markers::Send` is not implemented
+    //~^ ERROR `core::marker::Send` is not implemented
 }
index e604fd9f838f7b7704ad69bbc890143c797630d9..95855ed584bc9aa9ad46646cebcebb78301e81cf 100644 (file)
@@ -15,6 +15,6 @@ fn bar<T: Send>(_: T) {}
 fn main() {
     let x = Rc::new(5i);
     bar(x);
-    //~^ ERROR `core::markers::Send` is not implemented
-    //~^^ ERROR `core::markers::Send` is not implemented
+    //~^ ERROR `core::marker::Send` is not implemented
+    //~^^ ERROR `core::marker::Send` is not implemented
 }
index 7e2f7c55bd2726fb75666e65d54c2b2faa1113d5..c2d6f04c7d49c20b449f0f6697da70749b0bea38 100644 (file)
@@ -8,17 +8,17 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::markers;
+use std::marker;
 
 struct Foo {
     a: int,
-    ns: markers::NoSend
+    ns: marker::NoSend
 }
 
 fn bar<T: Send>(_: T) {}
 
 fn main() {
-    let x = Foo { a: 5, ns: markers::NoSend };
+    let x = Foo { a: 5, ns: marker::NoSend };
     bar(x);
-    //~^ ERROR the trait `core::markers::Send` is not implemented
+    //~^ ERROR the trait `core::marker::Send` is not implemented
 }
index aeaa56c35a83fb827edba0bc123fdd7dee97a70a..33222eef44e74122765b3251a237fd5bf9dd1239 100644 (file)
@@ -8,14 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::markers;
+use std::marker;
 
-enum Foo { A(markers::NoSync) }
+enum Foo { A(marker::NoSync) }
 
 fn bar<T: Sync>(_: T) {}
 
 fn main() {
-    let x = Foo::A(markers::NoSync);
+    let x = Foo::A(marker::NoSync);
     bar(x);
-    //~^ ERROR the trait `core::markers::Sync` is not implemented
+    //~^ ERROR the trait `core::marker::Sync` is not implemented
 }
index 66e8571527d03c89d1ea47aaf9e6a41875f005fb..0f3573e0ad5a98513b69aa2dd62c8aef5384bb28 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::markers::Sync` is not implemented
-    //~^^ ERROR the trait `core::markers::Sync` is not implemented
+    //~^ ERROR the trait `core::marker::Sync` is not implemented
+    //~^^ ERROR the trait `core::marker::Sync` is not implemented
 }
index ee6a29d31769a876388c37f375046c32847f64e3..59864b63b04940a7a6ef5686d5be234c04064885 100644 (file)
@@ -8,14 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::markers;
+use std::marker;
 
-struct Foo { a: int, m: markers::NoSync }
+struct Foo { a: int, m: marker::NoSync }
 
 fn bar<T: Sync>(_: T) {}
 
 fn main() {
-    let x = Foo { a: 5, m: markers::NoSync };
+    let x = Foo { a: 5, m: marker::NoSync };
     bar(x);
-    //~^ ERROR the trait `core::markers::Sync` is not implemented
+    //~^ ERROR the trait `core::marker::Sync` is not implemented
 }
index f949e89fcac0829ff6fb93bcf8c80ecd3447db6a..9e425fa8f2e7d2dfda66e02e820b69e14afa5a81 100644 (file)
@@ -30,7 +30,7 @@ impl Copy for IWantToCopyThis {}
 
 enum CantCopyThisEither {
     A,
-    B(::std::markers::NoCopy),
+    B(::std::marker::NoCopy),
 }
 
 enum IWantToCopyThisToo {
index b05117a71856cccbcbd9953066b6d254e1dad4e7..0ade29750442bcf14f3b6dda11ef681c71bff0d5 100644 (file)
@@ -23,5 +23,5 @@ pub fn main() {
     // Unsized type.
     let arr: &[_] = &[1u, 2, 3];
     let range = (*arr)..;
-    //~^ ERROR the trait `core::markers::Sized` is not implemented
+    //~^ ERROR the trait `core::marker::Sized` is not implemented
 }
index d8bad0f910321c5495deae19dbda8005acf1894a..4d31d2c8e6927e02a98d4bc53de4e857dbcf54c3 100644 (file)
 // Note: see variance-regions-*.rs for the tests that check that the
 // variance inference works in the first place.
 
-use std::markers;
+use std::marker;
 
 // This is contravariant with respect to 'a, meaning that
 // Contravariant<'foo> <: Contravariant<'static> because
 // 'foo <= 'static
 struct Contravariant<'a> {
-    marker: markers::ContravariantLifetime<'a>
+    marker: marker::ContravariantLifetime<'a>
 }
 
 fn use_<'short,'long>(c: Contravariant<'short>,
index 58c1f0c4721a08649fa2aa3c90c6b8fcaa214ab7..1c3b7bb5960e1d92dc08ac6979349434f32ec14c 100644 (file)
 // Note: see variance-regions-*.rs for the tests that check that the
 // variance inference works in the first place.
 
-use std::markers;
+use std::marker;
 
 struct Covariant<'a> {
-    marker: markers::CovariantLifetime<'a>
+    marker: marker::CovariantLifetime<'a>
 }
 
 fn use_<'short,'long>(c: Covariant<'long>,
index d3d6aa06cdba49c928fe80d540c79b3b6f307e4f..5f4a1af6bf90f1c4ea1f6c3e8e742c3e5265ea99 100644 (file)
@@ -8,10 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::markers;
+use std::marker;
 
 struct invariant<'a> {
-    marker: markers::InvariantLifetime<'a>
+    marker: marker::InvariantLifetime<'a>
 }
 
 fn to_same_lifetime<'r>(bi: invariant<'r>) {
index d8a183c0e469bccc6a19824c97d94bccb0c5a35b..762c976a943973b29652b917a30902da00475f90 100644 (file)
@@ -25,5 +25,5 @@ fn drop(&mut self) {
 fn main() {
     let a = Foo { x: 3 };
     let _ = [ a; 5 ];
-    //~^ ERROR the trait `core::markers::Copy` is not implemented for the type `Foo`
+    //~^ ERROR the trait `core::marker::Copy` is not implemented for the type `Foo`
 }
index e0f241f87a76b7e338c6799b380a677cda72ee8c..14ad1b3041f5bc6626c38d08fe7ac1746d2d33e2 100644 (file)
 
 // Verifies that static items can't be moved
 
-use std::markers;
+use std::marker;
 
 struct Foo {
     foo: int,
-    nocopy: markers::NoCopy
+    nocopy: marker::NoCopy
 }
 
-static BAR: Foo = Foo{foo: 5, nocopy: markers::NoCopy};
+static BAR: Foo = Foo{foo: 5, nocopy: marker::NoCopy};
 
 
 fn test(f: Foo) {
index 186f5f91eeeec6f8708058a137219620b6561d55..a7ca5e3bf093a02046a0f4d30e44e4e65d7ddf65 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::markers::Send;
+use std::marker::Send;
 
 struct TestType;
 
index bdfadcad2bf94ecaa74b7533ee757f1d4e03064c..1ab79f5c80ecc7253102943c6c138e2760867da5 100644 (file)
@@ -10,7 +10,7 @@
 
 #![feature(optin_builtin_traits)]
 
-use std::markers::Send;
+use std::marker::Send;
 
 struct TestType;
 
index 5bc96cae0bbeae2cd436c5ef233f6783b32a863b..fe31d81983e16ad137adefe4a8ecafda3c21b28c 100644 (file)
@@ -16,6 +16,6 @@ fn test_send<S: Send>() {}
 
 pub fn main() {
     test_send::<rand::ThreadRng>();
-    //~^ ERROR `core::markers::Send` is not implemented
-    //~^^ ERROR `core::markers::Send` is not implemented
+    //~^ ERROR `core::marker::Send` is not implemented
+    //~^^ ERROR `core::marker::Send` is not implemented
 }
index f569bed126d4572429e1b73b8ce6b77e88553867..434d803d718e7bcc143339e29bdfcbfeb069b473 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::markers::Sized` is not implemented
+    //~^ERROR the trait `core::marker::Sized` is not implemented
 }
 
 fn main() { }
index d3199ff982e00234ef7f332c8da5f95f9d0bfa46..5166a4e96540d152a99dcc32c55928869ffcf1f0 100644 (file)
 // ignore-tidy-linelength
 
 use std::cell::UnsafeCell;
-use std::markers;
+use std::marker;
 
 struct MySync<T> {
     u: UnsafeCell<T>
 }
 
 struct NoSync {
-    m: markers::NoSync
+    m: marker::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::markers::Sync` is not implemented
+    //~^ ERROR `core::marker::Sync` is not implemented
 
-    let uns = UnsafeCell::new(NoSync{m: markers::NoSync});
+    let uns = UnsafeCell::new(NoSync{m: marker::NoSync});
     test(uns);
-    //~^ ERROR `core::markers::Sync` is not implemented
+    //~^ ERROR `core::marker::Sync` is not implemented
 
     let ms = MySync{u: uns};
     test(ms);
-    //~^ ERROR `core::markers::Sync` is not implemented
+    //~^ ERROR `core::marker::Sync` is not implemented
 
-    let ns = NoSync{m: markers::NoSync};
+    let ns = NoSync{m: marker::NoSync};
     test(ns);
-    //~^ ERROR `core::markers::Sync` is not implemented
+    //~^ ERROR `core::marker::Sync` is not implemented
 }
index ee7d2cc168c0a1654aa9fc1abd032744191e882b..e0783b09cbdf5dbd50ad46d5bc80414a42f8e549 100644 (file)
@@ -15,7 +15,7 @@
 #![feature(unboxed_closures)]
 #![allow(dead_code)]
 
-use std::markers;
+use std::marker;
 
 trait Foo<'a,T,U> {
     fn dummy(&'a self) -> &'a (T,U);
index 98d8b2d36cd6e79e888c05369ce9990bfda7fa55..49cebbf52552ba33883070a7b67148378e805756 100644 (file)
@@ -17,6 +17,6 @@ fn f<T:Send>(_i: T) {
 fn main() {
     let i = box Rc::new(100i);
     f(i);
-    //~^ ERROR `core::markers::Send` is not implemented
-    //~^^ ERROR `core::markers::Send` is not implemented
+    //~^ ERROR `core::marker::Send` is not implemented
+    //~^^ ERROR `core::marker::Send` is not implemented
 }
index 6398623e75b8765701af3eb1e02e46c807c79097..96f36af53aad22a7b06bcabe9c3a0e6fc24edeca 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::markers::Send` is not implemented
-  //~^^ ERROR `core::markers::Send` is not implemented
+  //~^ ERROR `core::marker::Send` is not implemented
+  //~^^ ERROR `core::marker::Send` is not implemented
   tx.send(foo(42, Rc::new(cat)));
 }
index b6078cd3af47407aab48756c5c90bc54afd3a978..e28c082c80c4aebf54f5401cdc2163091fe71486 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::markers::Sized` is not implemented
+fn foo<T: ?Sized>() { bar::<T>() } //~ ERROR the trait `core::marker::Sized` is not implemented
 fn main() { }
index a78ffb13408921efa2217fd3a43f533e2e50d1a0..df961978086e7aa6958f01371247025757499b23 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::markers::Sized` is not implemented
+//~^ ERROR the trait `core::marker::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::markers::Sized` is not implemented
+//~^ ERROR the trait `core::marker::Sized` is not implemented
 //
 // Not OK: `Bar<T>` is not sized, but it should be.
 
index c681267915528233be192bdbab6d00ecba3a77c3..7b9fc2b468b78fbf34cb751441dba2bea0ef7626 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::markers::Sized` is not implemented
+//~^ ERROR the trait `core::marker::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::markers::Sized` is not implemented
+//~^ ERROR the trait `core::marker::Sized` is not implemented
 //
 // Not OK: `Bar<T>` is not sized, but it should be.
 
index 9a29775f7c90ca804df9c658af7daa599f09aea2..ac8043d6852a9b37927cc1e5c787c502c6cfe14f 100644 (file)
@@ -15,7 +15,7 @@ trait T2<Z> {
 }
 struct S4<Y: ?Sized>;
 impl<X: ?Sized> T2<X> for S4<X> {
-    //~^ ERROR `core::markers::Sized` is not implemented for the type `X`
+    //~^ ERROR `core::marker::Sized` is not implemented for the type `X`
 }
 
 fn main() { }
index 7e4a1d135570b2db3bc2deb1f9da8d037ecc7cc7..2d330654881ba73e031aac1759f5d38114af77dc 100644 (file)
@@ -14,7 +14,7 @@
 // Unbounded.
 fn f1<X: ?Sized>(x: &X) {
     f2::<X>(x);
-    //~^ ERROR the trait `core::markers::Sized` is not implemented
+    //~^ ERROR the trait `core::marker::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::markers::Sized` is not implemented
+    //~^ ERROR the trait `core::marker::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::markers::Sized` is not implemented
+    //~^ ERROR the trait `core::marker::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::markers::Sized` is not implemented
+    //~^ ERROR the trait `core::marker::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::markers::Sized` is not implemented
+    //~^ ERROR the trait `core::marker::Sized` is not implemented
 }
 
 fn f10<X: ?Sized>(x1: Box<S<X>>, x2: Box<E<X>>) {
     f5(&(32i, *x2));
-    //~^ ERROR the trait `core::markers::Sized` is not implemented
+    //~^ ERROR the trait `core::marker::Sized` is not implemented
 }
 
 pub fn main() {
index a714b7d92383b1564377031d1607b8d9e2027ac7..026d496aa43c763e92066d0a3750861697772d63 100644 (file)
 // Test `?Sized` types not allowed in fields (except the last one).
 
 struct S1<X: ?Sized> {
-    f1: X, //~ ERROR `core::markers::Sized` is not implemented
+    f1: X, //~ ERROR `core::marker::Sized` is not implemented
     f2: int,
 }
 struct S2<X: ?Sized> {
     f: int,
-    g: X, //~ ERROR `core::markers::Sized` is not implemented
+    g: X, //~ ERROR `core::marker::Sized` is not implemented
     h: int,
 }
 struct S3 {
-    f: str, //~ ERROR `core::markers::Sized` is not implemented
+    f: str, //~ ERROR `core::marker::Sized` is not implemented
     g: [uint]
 }
 struct S4 {
-    f: str, //~ ERROR `core::markers::Sized` is not implemented
+    f: str, //~ ERROR `core::marker::Sized` is not implemented
     g: uint
 }
 enum E<X: ?Sized> {
-    V1(X, int), //~ERROR `core::markers::Sized` is not implemented
+    V1(X, int), //~ERROR `core::marker::Sized` is not implemented
 }
 enum F<X: ?Sized> {
-    V2{f1: X, f: int}, //~ERROR `core::markers::Sized` is not implemented
+    V2{f1: X, f: int}, //~ERROR `core::marker::Sized` is not implemented
 }
 
 pub fn main() {
index d3b03493fdcb3d34792a1b7dcc5cdb78bd4a0f48..02f3404b72b11cc161757411821e1588c5580783 100644 (file)
@@ -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::markers::Sized` is not implemented
-    let y: (int, (X, int)); //~ERROR the trait `core::markers::Sized` is not implemented
+    let y: X; //~ERROR the trait `core::marker::Sized` is not implemented
+    let y: (int, (X, int)); //~ERROR the trait `core::marker::Sized` is not implemented
 }
 fn f2<X: ?Sized + T>(x: &X) {
-    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
+    let y: X; //~ERROR the trait `core::marker::Sized` is not implemented
+    let y: (int, (X, int)); //~ERROR the trait `core::marker::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::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
+    let y: X = *x1; //~ERROR the trait `core::marker::Sized` is not implemented
+    let y = *x2; //~ERROR the trait `core::marker::Sized` is not implemented
+    let (y, z) = (*x3, 4i); //~ERROR the trait `core::marker::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 f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
+    let y: X = *x1;         //~ERROR the trait `core::marker::Sized` is not implemented
+    let y = *x2;            //~ERROR the trait `core::marker::Sized` is not implemented
+    let (y, z) = (*x3, 4i); //~ERROR the trait `core::marker::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
+fn g1<X: ?Sized>(x: X) {} //~ERROR the trait `core::marker::Sized` is not implemented
+fn g2<X: ?Sized + T>(x: X) {} //~ERROR the trait `core::marker::Sized` is not implemented
 
 pub fn main() {
 }
index 32daa2a246ed24a08383bf74c415c687c569c522..6fc547c0b8e8610b2c2d073fcf58182525b8fec9 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::markers::Sized` is not implemented for the type `X`
+    //~^ ERROR `core::marker::Sized` is not implemented for the type `X`
 }
 
 fn main() { }
index c584c30448f09aeaa65ccaefc93df42dc45c2d06..74342cfedd3298261807b6cc1fe6c08b883fc026 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::markers::Copy` is not implemented for the type `T`
+        //~^ ERROR the trait `core::marker::Copy` is not implemented for the type `T`
     }
 }
 
index 45df3af08d48a30c3dcb710784b68cd4915673fb..8e01e89b6870782085d0aa7f86e91c20d4c039b1 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::markers::Copy` is not implemented for the type `T`
+        //~^ ERROR the trait `core::marker::Copy` is not implemented for the type `T`
     }
 }
 
index d18d6ffd7d06b2816ad4922659dd70b46860753c..d9d11c95adbdcf9789d2f676fa9939e6882560d8 100644 (file)
@@ -19,7 +19,7 @@
 #![feature(lang_items, unboxed_closures)]
 #![no_implicit_prelude]
 
-use std::markers::Sized;
+use std::marker::Sized;
 use std::option::Option::{None, Some, self};
 
 trait Iterator {
index 4ebf071cbc151cc4d481f4d1426ebf45b8468de0..4152321cab8139a1c26651f8309e4ab05666d23a 100644 (file)
@@ -19,7 +19,7 @@
 #![feature(lang_items, unboxed_closures)]
 #![no_implicit_prelude]
 
-use std::markers::Sized;
+use std::marker::Sized;
 use std::option::Option::{None, Some, self};
 
 trait Iterator {
index 9ec68264076dd38f1db2fa2b281025388e532ed1..84acd3c4ecd7ebe77d0f74d821c2e0be454d6228 100644 (file)
@@ -11,7 +11,7 @@
 #![allow(dead_code)]
 #![allow(unused_unsafe)]
 
-use std::markers::Sync;
+use std::marker::Sync;
 
 struct Foo {
     a: uint,
index 5ce8eb64318eeb34ec7b4fba6c7ab6ab2d3b6141..a08cd33362f4732cf59d66ee3aea4b12e041cfae 100644 (file)
@@ -11,7 +11,7 @@
 // Issue 4691: Ensure that functional-struct-updates operates
 // correctly and moves rather than copy when appropriate.
 
-use std::markers::NoCopy as NP;
+use std::marker::NoCopy as NP;
 
 struct ncint { np: NP, v: int }
 fn ncint(v: int) -> ncint { ncint { np: NP, v: v } }
index e364cb0c9a2abc32bfa3d9bafe6f1059088722be..8eaf8427bfdec9bbc680ccd0d187c60928d3dab3 100644 (file)
@@ -18,7 +18,7 @@
 
 #![allow(dead_code)]
 
-use std::markers;
+use std::marker;
 
 #[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(markers::InvariantLifetime<'tcx>)
+    Boop(marker::InvariantLifetime<'tcx>)
 }
 
 enum Bar<'tcx> {
index ac9a70379f8f9a5ce12e159bcbd2b65065eb5ecf..cdd03244df14567d8e4b12db36f191c59b366686 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::markers;
+use std::marker;
 use std::cell::UnsafeCell;
 
 struct MyUnsafePack<T>(UnsafeCell<T>);
index 435b16998837bb738165ea68138b08fabf52e45f..3ca3e0592e7896e64b0ebcd2c6a829e958e0bd28 100644 (file)
@@ -23,7 +23,7 @@ pub mod pipes {
     use std::mem::{replace, swap};
     use std::mem;
     use std::thread::Thread;
-    use std::markers::Send;
+    use std::marker::Send;
 
     pub struct Stuff<T> {
         state: state,
index 279f05ea1c9467309511c6d3cc02cba082437539..338bd89ab5cb1e55e833fe478a790b04d849b382 100644 (file)
@@ -13,7 +13,7 @@
 // know not to stop at the blanket, we have to recursively evaluate
 // the `T:Foo` bound.
 
-use std::markers::Sized;
+use std::marker::Sized;
 
 // Note: this must be generic for the problem to show up
 trait Foo<A> {
index a750b3f4b4e10bc11feb839a566b2f7152aff087..a3288e2e1b90b1a80b2633cfa686095634720caf 100644 (file)
@@ -11,7 +11,7 @@
 // Test that a type whose lifetime parameters is never used is
 // inferred to be bivariant.
 
-use std::markers;
+use std::marker;
 
 struct Bivariant<'a>;
 
index 244e084e65b822c6afe8a4d9ff5c8ee212e0a409..a91e5da15376800596c89ea4dfdbf9b3dbb67600 100644 (file)
@@ -10,7 +10,7 @@
 
 #![feature(optin_builtin_traits)]
 
-use std::markers::Send;
+use std::marker::Send;
 
 struct TestType;