markers -> marker
This commit is contained in:
parent
91ba66fa99
commit
9f07d055f7
154 changed files with 332 additions and 332 deletions
|
@ -74,7 +74,7 @@ use core::clone::Clone;
|
||||||
use core::fmt::{self, Show};
|
use core::fmt::{self, Show};
|
||||||
use core::cmp::{Eq, Ord, PartialEq, PartialOrd, Ordering};
|
use core::cmp::{Eq, Ord, PartialEq, PartialOrd, Ordering};
|
||||||
use core::default::Default;
|
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::{min_align_of, size_of, drop};
|
||||||
use core::mem;
|
use core::mem;
|
||||||
use core::nonzero::NonZero;
|
use core::nonzero::NonZero;
|
||||||
|
|
|
@ -18,7 +18,7 @@ use core::cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering};
|
||||||
use core::default::Default;
|
use core::default::Default;
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::hash::{self, Hash};
|
use core::hash::{self, Hash};
|
||||||
use core::markers::Sized;
|
use core::marker::Sized;
|
||||||
use core::mem;
|
use core::mem;
|
||||||
use core::option::Option;
|
use core::option::Option;
|
||||||
use core::ptr::Unique;
|
use core::ptr::Unique;
|
||||||
|
|
|
@ -148,7 +148,7 @@ use core::cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering};
|
||||||
use core::default::Default;
|
use core::default::Default;
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::hash::{self, Hash};
|
use core::hash::{self, Hash};
|
||||||
use core::markers;
|
use core::marker;
|
||||||
use core::mem::{transmute, min_align_of, size_of, forget};
|
use core::mem::{transmute, min_align_of, size_of, forget};
|
||||||
use core::nonzero::NonZero;
|
use core::nonzero::NonZero;
|
||||||
use core::ops::{Deref, Drop};
|
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
|
// FIXME #12808: strange names to try to avoid interfering with field accesses of the contained
|
||||||
// type via Deref
|
// type via Deref
|
||||||
_ptr: NonZero<*mut RcBox<T>>,
|
_ptr: NonZero<*mut RcBox<T>>,
|
||||||
_nosend: markers::NoSend,
|
_nosend: marker::NoSend,
|
||||||
_noshare: markers::NoSync
|
_noshare: marker::NoSync
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> Rc<T> {
|
impl<T> Rc<T> {
|
||||||
|
@ -201,8 +201,8 @@ impl<T> Rc<T> {
|
||||||
strong: Cell::new(1),
|
strong: Cell::new(1),
|
||||||
weak: Cell::new(1)
|
weak: Cell::new(1)
|
||||||
})),
|
})),
|
||||||
_nosend: markers::NoSend,
|
_nosend: marker::NoSend,
|
||||||
_noshare: markers::NoSync
|
_noshare: marker::NoSync
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,8 +223,8 @@ impl<T> Rc<T> {
|
||||||
self.inc_weak();
|
self.inc_weak();
|
||||||
Weak {
|
Weak {
|
||||||
_ptr: self._ptr,
|
_ptr: self._ptr,
|
||||||
_nosend: markers::NoSend,
|
_nosend: marker::NoSend,
|
||||||
_noshare: markers::NoSync
|
_noshare: marker::NoSync
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -431,7 +431,7 @@ impl<T> Clone for Rc<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn clone(&self) -> Rc<T> {
|
fn clone(&self) -> Rc<T> {
|
||||||
self.inc_strong();
|
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
|
// FIXME #12808: strange names to try to avoid interfering with
|
||||||
// field accesses of the contained type via Deref
|
// field accesses of the contained type via Deref
|
||||||
_ptr: NonZero<*mut RcBox<T>>,
|
_ptr: NonZero<*mut RcBox<T>>,
|
||||||
_nosend: markers::NoSend,
|
_nosend: marker::NoSend,
|
||||||
_noshare: markers::NoSync
|
_noshare: marker::NoSync
|
||||||
}
|
}
|
||||||
|
|
||||||
#[experimental = "Weak pointers may not belong in this module."]
|
#[experimental = "Weak pointers may not belong in this module."]
|
||||||
|
@ -650,7 +650,7 @@ impl<T> Weak<T> {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
self.inc_strong();
|
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]
|
#[inline]
|
||||||
fn clone(&self) -> Weak<T> {
|
fn clone(&self) -> Weak<T> {
|
||||||
self.inc_weak();
|
self.inc_weak();
|
||||||
Weak { _ptr: self._ptr, _nosend: markers::NoSend, _noshare: markers::NoSync }
|
Weak { _ptr: self._ptr, _nosend: marker::NoSend, _noshare: marker::NoSync }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -480,7 +480,7 @@ enum Continuation<A, B> {
|
||||||
/// boilerplate gets cut out.
|
/// boilerplate gets cut out.
|
||||||
mod stack {
|
mod stack {
|
||||||
use core::prelude::*;
|
use core::prelude::*;
|
||||||
use core::markers;
|
use core::marker;
|
||||||
use core::mem;
|
use core::mem;
|
||||||
use core::ops::{Deref, DerefMut};
|
use core::ops::{Deref, DerefMut};
|
||||||
use super::BTreeMap;
|
use super::BTreeMap;
|
||||||
|
@ -494,7 +494,7 @@ mod stack {
|
||||||
/// where `&'static` can be used in any function expecting any lifetime reference.
|
/// where `&'static` can be used in any function expecting any lifetime reference.
|
||||||
pub struct IdRef<'id, T: 'id> {
|
pub struct IdRef<'id, T: 'id> {
|
||||||
inner: &'id mut T,
|
inner: &'id mut T,
|
||||||
marker: markers::InvariantLifetime<'id>
|
marker: marker::InvariantLifetime<'id>
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'id, T> Deref for IdRef<'id, T> {
|
impl<'id, T> Deref for IdRef<'id, T> {
|
||||||
|
@ -536,7 +536,7 @@ mod stack {
|
||||||
pub struct Pusher<'id, 'a, K:'a, V:'a> {
|
pub struct Pusher<'id, 'a, K:'a, V:'a> {
|
||||||
map: &'a mut BTreeMap<K, V>,
|
map: &'a mut BTreeMap<K, V>,
|
||||||
stack: Stack<K, V>,
|
stack: Stack<K, V>,
|
||||||
marker: markers::InvariantLifetime<'id>
|
marker: marker::InvariantLifetime<'id>
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, K, V> PartialSearchStack<'a, K, V> {
|
impl<'a, K, V> PartialSearchStack<'a, K, V> {
|
||||||
|
@ -571,11 +571,11 @@ mod stack {
|
||||||
let pusher = Pusher {
|
let pusher = Pusher {
|
||||||
map: self.map,
|
map: self.map,
|
||||||
stack: self.stack,
|
stack: self.stack,
|
||||||
marker: markers::InvariantLifetime
|
marker: marker::InvariantLifetime
|
||||||
};
|
};
|
||||||
let node = IdRef {
|
let node = IdRef {
|
||||||
inner: unsafe { &mut *self.next },
|
inner: unsafe { &mut *self.next },
|
||||||
marker: markers::InvariantLifetime
|
marker: marker::InvariantLifetime
|
||||||
};
|
};
|
||||||
|
|
||||||
closure(pusher, node)
|
closure(pusher, node)
|
||||||
|
|
|
@ -124,8 +124,8 @@ mod std {
|
||||||
pub use core::clone; // deriving(Clone)
|
pub use core::clone; // deriving(Clone)
|
||||||
pub use core::cmp; // deriving(Eq, Ord, etc.)
|
pub use core::cmp; // deriving(Eq, Ord, etc.)
|
||||||
#[cfg(stage0)]
|
#[cfg(stage0)]
|
||||||
pub use core::markers as kinds;
|
pub use core::marker as kinds;
|
||||||
pub use core::markers; // deriving(Copy)
|
pub use core::marker; // deriving(Copy)
|
||||||
pub use core::hash; // deriving(Hash)
|
pub use core::hash; // deriving(Hash)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ mod prelude {
|
||||||
pub use core::iter::{FromIterator, Extend, IteratorExt};
|
pub use core::iter::{FromIterator, Extend, IteratorExt};
|
||||||
pub use core::iter::{Iterator, DoubleEndedIterator, RandomAccessIterator};
|
pub use core::iter::{Iterator, DoubleEndedIterator, RandomAccessIterator};
|
||||||
pub use core::iter::{ExactSizeIterator};
|
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::mem::drop;
|
||||||
pub use core::ops::{Drop, Fn, FnMut, FnOnce};
|
pub use core::ops::{Drop, Fn, FnMut, FnOnce};
|
||||||
pub use core::option::Option;
|
pub use core::option::Option;
|
||||||
|
|
|
@ -20,7 +20,7 @@ use core::cmp::Ordering;
|
||||||
use core::default::Default;
|
use core::default::Default;
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::iter::{self, repeat, FromIterator, RandomAccessIterator};
|
use core::iter::{self, repeat, FromIterator, RandomAccessIterator};
|
||||||
use core::markers;
|
use core::marker;
|
||||||
use core::mem;
|
use core::mem;
|
||||||
use core::num::{Int, UnsignedInt};
|
use core::num::{Int, UnsignedInt};
|
||||||
use core::ops::{Index, IndexMut};
|
use core::ops::{Index, IndexMut};
|
||||||
|
@ -534,7 +534,7 @@ impl<T> RingBuf<T> {
|
||||||
head: self.head,
|
head: self.head,
|
||||||
cap: self.cap,
|
cap: self.cap,
|
||||||
ptr: self.ptr,
|
ptr: self.ptr,
|
||||||
marker: markers::ContravariantLifetime::<'a>,
|
marker: marker::ContravariantLifetime::<'a>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1414,7 +1414,7 @@ pub struct IterMut<'a, T:'a> {
|
||||||
tail: uint,
|
tail: uint,
|
||||||
head: uint,
|
head: uint,
|
||||||
cap: uint,
|
cap: uint,
|
||||||
marker: markers::ContravariantLifetime<'a>,
|
marker: marker::ContravariantLifetime<'a>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[stable]
|
#[stable]
|
||||||
|
|
|
@ -95,7 +95,7 @@ use core::cmp::Ordering::{self, Greater, Less};
|
||||||
use core::cmp::{self, Ord, PartialEq};
|
use core::cmp::{self, Ord, PartialEq};
|
||||||
use core::iter::{Iterator, IteratorExt};
|
use core::iter::{Iterator, IteratorExt};
|
||||||
use core::iter::{range, range_step, MultiplicativeIterator};
|
use core::iter::{range, range_step, MultiplicativeIterator};
|
||||||
use core::markers::Sized;
|
use core::marker::Sized;
|
||||||
use core::mem::size_of;
|
use core::mem::size_of;
|
||||||
use core::mem;
|
use core::mem;
|
||||||
use core::ops::{FnMut, SliceMut};
|
use core::ops::{FnMut, SliceMut};
|
||||||
|
|
|
@ -55,7 +55,7 @@ use core::default::Default;
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::hash::{self, Hash};
|
use core::hash::{self, Hash};
|
||||||
use core::iter::{repeat, FromIterator};
|
use core::iter::{repeat, FromIterator};
|
||||||
use core::markers::{ContravariantLifetime, InvariantType};
|
use core::marker::{ContravariantLifetime, InvariantType};
|
||||||
use core::mem;
|
use core::mem;
|
||||||
use core::nonzero::NonZero;
|
use core::nonzero::NonZero;
|
||||||
use core::num::{Int, UnsignedInt};
|
use core::num::{Int, UnsignedInt};
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering};
|
use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering};
|
||||||
use fmt;
|
use fmt;
|
||||||
use markers::Copy;
|
use marker::Copy;
|
||||||
use ops::Deref;
|
use ops::Deref;
|
||||||
use option::Option;
|
use option::Option;
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
|
|
||||||
use self::Ordering::*;
|
use self::Ordering::*;
|
||||||
|
|
||||||
use markers::Sync;
|
use marker::Sync;
|
||||||
|
|
||||||
use intrinsics;
|
use intrinsics;
|
||||||
use cell::UnsafeCell;
|
use cell::UnsafeCell;
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
use cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
|
use cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
|
||||||
use fmt;
|
use fmt;
|
||||||
use markers::Sized;
|
use marker::Sized;
|
||||||
use ops::Deref;
|
use ops::Deref;
|
||||||
use option::Option;
|
use option::Option;
|
||||||
use self::Cow::*;
|
use self::Cow::*;
|
||||||
|
|
|
@ -161,7 +161,7 @@ use clone::Clone;
|
||||||
use cmp::PartialEq;
|
use cmp::PartialEq;
|
||||||
use default::Default;
|
use default::Default;
|
||||||
use fmt;
|
use fmt;
|
||||||
use markers::{Copy, Send};
|
use marker::{Copy, Send};
|
||||||
use ops::{Deref, DerefMut, Drop};
|
use ops::{Deref, DerefMut, Drop};
|
||||||
use option::Option;
|
use option::Option;
|
||||||
use option::Option::{None, Some};
|
use option::Option::{None, Some};
|
||||||
|
@ -520,11 +520,11 @@ impl<'b, T> DerefMut for RefMut<'b, T> {
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use std::cell::UnsafeCell;
|
/// use std::cell::UnsafeCell;
|
||||||
/// use std::markers;
|
/// use std::marker;
|
||||||
///
|
///
|
||||||
/// struct NotThreadSafe<T> {
|
/// struct NotThreadSafe<T> {
|
||||||
/// value: UnsafeCell<T>,
|
/// value: UnsafeCell<T>,
|
||||||
/// marker: markers::NoSync
|
/// marker: marker::NoSync
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#![stable]
|
#![stable]
|
||||||
|
|
||||||
use markers::Sized;
|
use marker::Sized;
|
||||||
|
|
||||||
/// A common trait for cloning an object.
|
/// A common trait for cloning an object.
|
||||||
#[stable]
|
#[stable]
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
use self::Ordering::*;
|
use self::Ordering::*;
|
||||||
|
|
||||||
use markers::Sized;
|
use marker::Sized;
|
||||||
use option::Option::{self, Some, None};
|
use option::Option::{self, Some, None};
|
||||||
|
|
||||||
/// Trait for equality comparisons which are [partial equivalence relations](
|
/// 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 {
|
mod impls {
|
||||||
use cmp::{PartialOrd, Ord, PartialEq, Eq, Ordering};
|
use cmp::{PartialOrd, Ord, PartialEq, Eq, Ordering};
|
||||||
use cmp::Ordering::{Less, Greater, Equal};
|
use cmp::Ordering::{Less, Greater, Equal};
|
||||||
use markers::Sized;
|
use marker::Sized;
|
||||||
use option::Option;
|
use option::Option;
|
||||||
use option::Option::{Some, None};
|
use option::Option::{Some, None};
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
use any;
|
use any;
|
||||||
use cell::{Cell, Ref, RefMut};
|
use cell::{Cell, Ref, RefMut};
|
||||||
use iter::{Iterator, IteratorExt, range};
|
use iter::{Iterator, IteratorExt, range};
|
||||||
use markers::{Copy, Sized};
|
use marker::{Copy, Sized};
|
||||||
use mem;
|
use mem;
|
||||||
use option::Option;
|
use option::Option;
|
||||||
use option::Option::{Some, None};
|
use option::Option::{Some, None};
|
||||||
|
|
|
@ -67,7 +67,7 @@ use num::{ToPrimitive, Int};
|
||||||
use ops::{Add, Deref, FnMut};
|
use ops::{Add, Deref, FnMut};
|
||||||
use option::Option;
|
use option::Option;
|
||||||
use option::Option::{Some, None};
|
use option::Option::{Some, None};
|
||||||
use std::markers::Sized;
|
use std::marker::Sized;
|
||||||
use uint;
|
use uint;
|
||||||
|
|
||||||
/// An interface for dealing with "external iterators". These types of iterators
|
/// An interface for dealing with "external iterators". These types of iterators
|
||||||
|
|
|
@ -111,7 +111,7 @@ pub mod ptr;
|
||||||
|
|
||||||
/* Core language traits */
|
/* Core language traits */
|
||||||
|
|
||||||
pub mod markers;
|
pub mod marker;
|
||||||
pub mod ops;
|
pub mod ops;
|
||||||
pub mod cmp;
|
pub mod cmp;
|
||||||
pub mod clone;
|
pub mod clone;
|
||||||
|
@ -151,8 +151,8 @@ mod std {
|
||||||
pub use clone;
|
pub use clone;
|
||||||
pub use cmp;
|
pub use cmp;
|
||||||
#[cfg(stage0)]
|
#[cfg(stage0)]
|
||||||
pub use markers as kinds;
|
pub use marker as kinds;
|
||||||
pub use markers;
|
pub use marker;
|
||||||
pub use option;
|
pub use option;
|
||||||
pub use fmt;
|
pub use fmt;
|
||||||
pub use hash;
|
pub use hash;
|
||||||
|
|
|
@ -87,7 +87,7 @@ pub trait Copy {
|
||||||
///
|
///
|
||||||
/// Users writing their own types with interior mutability (or anything
|
/// Users writing their own types with interior mutability (or anything
|
||||||
/// else that is not thread-safe) should use the `NoSync` marker type
|
/// else that is not thread-safe) should use the `NoSync` marker type
|
||||||
/// (from `std::markers`) to ensure that the compiler doesn't
|
/// (from `std::marker`) to ensure that the compiler doesn't
|
||||||
/// consider the user-defined type to be `Sync`. Any types with
|
/// consider the user-defined type to be `Sync`. Any types with
|
||||||
/// interior mutability must also use the `std::cell::UnsafeCell` wrapper
|
/// interior mutability must also use the `std::cell::UnsafeCell` wrapper
|
||||||
/// around the value(s) which can be mutated when behind a `&`
|
/// around the value(s) which can be mutated when behind a `&`
|
||||||
|
@ -140,10 +140,10 @@ pub unsafe trait Sync {
|
||||||
#[unstable = "likely to change with new variance strategy"]
|
#[unstable = "likely to change with new variance strategy"]
|
||||||
#[lang="covariant_type"]
|
#[lang="covariant_type"]
|
||||||
#[derive(PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(PartialEq, Eq, PartialOrd, Ord)]
|
||||||
pub struct CovariantType<Sized? T>;
|
pub struct CovariantType<T: ?Sized>;
|
||||||
|
|
||||||
impl<Sized? T> Copy for CovariantType<T> {}
|
impl<T: ?Sized> Copy for CovariantType<T> {}
|
||||||
impl<Sized? T> Clone for CovariantType<T> {
|
impl<T: ?Sized> Clone for CovariantType<T> {
|
||||||
fn clone(&self) -> CovariantType<T> { *self }
|
fn clone(&self) -> CovariantType<T> { *self }
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
#![stable]
|
#![stable]
|
||||||
|
|
||||||
use markers::Sized;
|
use marker::Sized;
|
||||||
use intrinsics;
|
use intrinsics;
|
||||||
use ptr;
|
use ptr;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ use cmp::{PartialEq, Eq};
|
||||||
use cmp::{PartialOrd, Ord};
|
use cmp::{PartialOrd, Ord};
|
||||||
use intrinsics;
|
use intrinsics;
|
||||||
use iter::IteratorExt;
|
use iter::IteratorExt;
|
||||||
use markers::Copy;
|
use marker::Copy;
|
||||||
use mem::size_of;
|
use mem::size_of;
|
||||||
use ops::{Add, Sub, Mul, Div, Rem, Neg};
|
use ops::{Add, Sub, Mul, Div, Rem, Neg};
|
||||||
use ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr};
|
use ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr};
|
||||||
|
@ -992,7 +992,7 @@ impl_to_primitive_float! { f64 }
|
||||||
|
|
||||||
/// A generic trait for converting a number to a value.
|
/// A generic trait for converting a number to a value.
|
||||||
#[experimental = "trait is likely to be removed"]
|
#[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
|
/// Convert an `int` to return an optional value of this type. If the
|
||||||
/// value cannot be represented by this value, the `None` is returned.
|
/// value cannot be represented by this value, the `None` is returned.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
use iter::{Step, Iterator,DoubleEndedIterator,ExactSizeIterator};
|
use iter::{Step, Iterator,DoubleEndedIterator,ExactSizeIterator};
|
||||||
use markers::Sized;
|
use marker::Sized;
|
||||||
use option::Option::{self, Some, None};
|
use option::Option::{self, Some, None};
|
||||||
|
|
||||||
/// The `Drop` trait is used to run some code when a value goes out of scope. This
|
/// The `Drop` trait is used to run some code when a value goes out of scope. This
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
// Reexported core operators
|
// Reexported core operators
|
||||||
pub use markers::{Copy, Send, Sized, Sync};
|
pub use marker::{Copy, Send, Sized, Sync};
|
||||||
pub use ops::{Drop, Fn, FnMut, FnOnce};
|
pub use ops::{Drop, Fn, FnMut, FnOnce};
|
||||||
|
|
||||||
// Reexported functions
|
// Reexported functions
|
||||||
|
|
|
@ -92,7 +92,7 @@ use mem;
|
||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
use intrinsics;
|
use intrinsics;
|
||||||
use option::Option::{self, Some, None};
|
use option::Option::{self, Some, None};
|
||||||
use markers::{Send, Sized, Sync};
|
use marker::{Send, Sized, Sync};
|
||||||
|
|
||||||
use cmp::{PartialEq, Eq, Ord, PartialOrd};
|
use cmp::{PartialEq, Eq, Ord, PartialOrd};
|
||||||
use cmp::Ordering::{self, Less, Equal, Greater};
|
use cmp::Ordering::{self, Less, Equal, Greater};
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
//!
|
//!
|
||||||
//! Their definition should always match the ABI defined in `rustc::back::abi`.
|
//! Their definition should always match the ABI defined in `rustc::back::abi`.
|
||||||
|
|
||||||
use markers::Copy;
|
use marker::Copy;
|
||||||
use mem;
|
use mem;
|
||||||
|
|
||||||
/// The representation of a Rust slice
|
/// The representation of a Rust slice
|
||||||
|
|
|
@ -41,7 +41,7 @@ use cmp::Ordering::{Less, Equal, Greater};
|
||||||
use cmp;
|
use cmp;
|
||||||
use default::Default;
|
use default::Default;
|
||||||
use iter::*;
|
use iter::*;
|
||||||
use markers::Copy;
|
use marker::Copy;
|
||||||
use num::Int;
|
use num::Int;
|
||||||
use ops::{FnMut, self};
|
use ops::{FnMut, self};
|
||||||
use option::Option;
|
use option::Option;
|
||||||
|
@ -52,7 +52,7 @@ use ptr;
|
||||||
use ptr::PtrExt;
|
use ptr::PtrExt;
|
||||||
use mem;
|
use mem;
|
||||||
use mem::size_of;
|
use mem::size_of;
|
||||||
use markers::{Sized, self};
|
use marker::{Sized, self};
|
||||||
use raw::Repr;
|
use raw::Repr;
|
||||||
// Avoid conflicts with *both* the Slice trait (buggy) and the `slice::raw` module.
|
// Avoid conflicts with *both* the Slice trait (buggy) and the `slice::raw` module.
|
||||||
use raw::Slice as RawSlice;
|
use raw::Slice as RawSlice;
|
||||||
|
@ -169,11 +169,11 @@ impl<T> SliceExt for [T] {
|
||||||
if mem::size_of::<T>() == 0 {
|
if mem::size_of::<T>() == 0 {
|
||||||
Iter {ptr: p,
|
Iter {ptr: p,
|
||||||
end: (p as uint + self.len()) as *const T,
|
end: (p as uint + self.len()) as *const T,
|
||||||
marker: markers::ContravariantLifetime::<'a>}
|
marker: marker::ContravariantLifetime::<'a>}
|
||||||
} else {
|
} else {
|
||||||
Iter {ptr: p,
|
Iter {ptr: p,
|
||||||
end: p.offset(self.len() as int),
|
end: p.offset(self.len() as int),
|
||||||
marker: markers::ContravariantLifetime::<'a>}
|
marker: marker::ContravariantLifetime::<'a>}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -322,11 +322,11 @@ impl<T> SliceExt for [T] {
|
||||||
if mem::size_of::<T>() == 0 {
|
if mem::size_of::<T>() == 0 {
|
||||||
IterMut {ptr: p,
|
IterMut {ptr: p,
|
||||||
end: (p as uint + self.len()) as *mut T,
|
end: (p as uint + self.len()) as *mut T,
|
||||||
marker: markers::ContravariantLifetime::<'a>}
|
marker: marker::ContravariantLifetime::<'a>}
|
||||||
} else {
|
} else {
|
||||||
IterMut {ptr: p,
|
IterMut {ptr: p,
|
||||||
end: p.offset(self.len() as int),
|
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> {
|
pub struct Iter<'a, T: 'a> {
|
||||||
ptr: *const T,
|
ptr: *const T,
|
||||||
end: *const T,
|
end: *const T,
|
||||||
marker: markers::ContravariantLifetime<'a>
|
marker: marker::ContravariantLifetime<'a>
|
||||||
}
|
}
|
||||||
|
|
||||||
#[experimental]
|
#[experimental]
|
||||||
|
@ -809,7 +809,7 @@ impl<'a, T> RandomAccessIterator for Iter<'a, T> {
|
||||||
pub struct IterMut<'a, T: 'a> {
|
pub struct IterMut<'a, T: 'a> {
|
||||||
ptr: *mut T,
|
ptr: *mut T,
|
||||||
end: *mut T,
|
end: *mut T,
|
||||||
marker: markers::ContravariantLifetime<'a>,
|
marker: marker::ContravariantLifetime<'a>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[experimental]
|
#[experimental]
|
||||||
|
|
|
@ -23,7 +23,7 @@ use default::Default;
|
||||||
use iter::range;
|
use iter::range;
|
||||||
use iter::ExactSizeIterator;
|
use iter::ExactSizeIterator;
|
||||||
use iter::{Map, Iterator, IteratorExt, DoubleEndedIterator};
|
use iter::{Map, Iterator, IteratorExt, DoubleEndedIterator};
|
||||||
use markers::Sized;
|
use marker::Sized;
|
||||||
use mem;
|
use mem;
|
||||||
use num::Int;
|
use num::Int;
|
||||||
use ops::{Fn, FnMut};
|
use ops::{Fn, FnMut};
|
||||||
|
|
|
@ -10,4 +10,4 @@
|
||||||
|
|
||||||
//! Types dealing with unsafe actions.
|
//! Types dealing with unsafe actions.
|
||||||
|
|
||||||
use markers;
|
use marker;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
use core::markers::Sized;
|
use core::marker::Sized;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
use core::slice::SliceExt;
|
use core::slice::SliceExt;
|
||||||
|
|
|
@ -12,7 +12,7 @@ use core::cmp::PartialEq;
|
||||||
use core::fmt::Show;
|
use core::fmt::Show;
|
||||||
use core::num::{NumCast, cast};
|
use core::num::{NumCast, cast};
|
||||||
use core::ops::{Add, Sub, Mul, Div, Rem};
|
use core::ops::{Add, Sub, Mul, Div, Rem};
|
||||||
use core::markers::Copy;
|
use core::marker::Copy;
|
||||||
|
|
||||||
#[cfg_attr(stage0, macro_escape)]
|
#[cfg_attr(stage0, macro_escape)]
|
||||||
#[cfg_attr(not(stage0), macro_use)]
|
#[cfg_attr(not(stage0), macro_use)]
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use core::option::*;
|
use core::option::*;
|
||||||
use core::markers;
|
use core::marker;
|
||||||
use core::mem;
|
use core::mem;
|
||||||
use core::clone::Clone;
|
use core::clone::Clone;
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ fn test_option_dance() {
|
||||||
|
|
||||||
#[test] #[should_fail]
|
#[test] #[should_fail]
|
||||||
fn test_option_too_much_dance() {
|
fn test_option_too_much_dance() {
|
||||||
let mut y = Some(markers::NoCopy);
|
let mut y = Some(marker::NoCopy);
|
||||||
let _y2 = y.take().unwrap();
|
let _y2 = y.take().unwrap();
|
||||||
let _y3 = y.take().unwrap();
|
let _y3 = y.take().unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
@ -5082,6 +5082,6 @@ pub fn issue_14344_workaround() {} // FIXME #14344 force linkage to happen corre
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
mod std {
|
mod std {
|
||||||
#[cfg(stage0)]
|
#[cfg(stage0)]
|
||||||
pub use core::markers as kinds;
|
pub use core::marker as kinds;
|
||||||
pub use core::markers;
|
pub use core::marker;
|
||||||
}
|
}
|
||||||
|
|
|
@ -517,8 +517,8 @@ mod std {
|
||||||
pub use core::{option, fmt}; // panic!()
|
pub use core::{option, fmt}; // panic!()
|
||||||
pub use core::clone; // derive Clone
|
pub use core::clone; // derive Clone
|
||||||
#[cfg(stage0)]
|
#[cfg(stage0)]
|
||||||
pub use core::markers as kinds;
|
pub use core::marker as kinds;
|
||||||
pub use core::markers;
|
pub use core::marker;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
|
@ -29,7 +29,7 @@ use middle::ty::{MethodOrigin, MethodParam, MethodTypeParam};
|
||||||
use middle::ty::{MethodStatic, MethodStaticUnboxedClosure};
|
use middle::ty::{MethodStatic, MethodStaticUnboxedClosure};
|
||||||
use util::ppaux::Repr;
|
use util::ppaux::Repr;
|
||||||
|
|
||||||
use std::markers;
|
use std::marker;
|
||||||
use syntax::{ast, ast_util};
|
use syntax::{ast, ast_util};
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
use syntax::codemap::Span;
|
use syntax::codemap::Span;
|
||||||
|
@ -135,7 +135,7 @@ enum TrackMatchMode<T> {
|
||||||
Conflicting,
|
Conflicting,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> markers::Copy for TrackMatchMode<T> {}
|
impl<T> marker::Copy for TrackMatchMode<T> {}
|
||||||
|
|
||||||
impl<T> TrackMatchMode<T> {
|
impl<T> TrackMatchMode<T> {
|
||||||
// Builds up the whole match mode for a pattern from its constituent
|
// Builds up the whole match mode for a pattern from its constituent
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
pub use self::VarValue::*;
|
pub use self::VarValue::*;
|
||||||
|
|
||||||
use std::markers;
|
use std::marker;
|
||||||
|
|
||||||
use middle::ty::{expected_found, IntVarValue};
|
use middle::ty::{expected_found, IntVarValue};
|
||||||
use middle::ty::{self, Ty};
|
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*.
|
/// made during the snapshot may either be *committed* or *rolled back*.
|
||||||
pub struct Snapshot<K> {
|
pub struct Snapshot<K> {
|
||||||
// Link snapshot to the key type `K` of the table.
|
// Link snapshot to the key type `K` of the table.
|
||||||
marker: markers::CovariantType<K>,
|
marker: marker::CovariantType<K>,
|
||||||
snapshot: sv::Snapshot,
|
snapshot: sv::Snapshot,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ impl<'tcx, V:PartialEq+Clone+Repr<'tcx>, K:UnifyKey<'tcx, V>> UnificationTable<K
|
||||||
/// Starts a new snapshot. Each snapshot must be either
|
/// Starts a new snapshot. Each snapshot must be either
|
||||||
/// rolled back or committed in a "LIFO" (stack) order.
|
/// rolled back or committed in a "LIFO" (stack) order.
|
||||||
pub fn snapshot(&mut self) -> Snapshot<K> {
|
pub fn snapshot(&mut self) -> Snapshot<K> {
|
||||||
Snapshot { marker: markers::CovariantType::<K>,
|
Snapshot { marker: marker::CovariantType::<K>,
|
||||||
snapshot: self.values.start_snapshot() }
|
snapshot: self.values.start_snapshot() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -402,8 +402,8 @@ impl<'a, 'tcx, 'v> Visitor<'v> for TermsContext<'a, 'tcx> {
|
||||||
struct ConstraintContext<'a, 'tcx: 'a> {
|
struct ConstraintContext<'a, 'tcx: 'a> {
|
||||||
terms_cx: TermsContext<'a, 'tcx>,
|
terms_cx: TermsContext<'a, 'tcx>,
|
||||||
|
|
||||||
// These are the def-id of the std::markers::InvariantType,
|
// These are the def-id of the std::marker::InvariantType,
|
||||||
// std::markers::InvariantLifetime, and so on. The arrays
|
// std::marker::InvariantLifetime, and so on. The arrays
|
||||||
// are indexed by the `ParamKind` (type, lifetime, self). Note
|
// are indexed by the `ParamKind` (type, lifetime, self). Note
|
||||||
// that there are no marker types for self, so the entries for
|
// that there are no marker types for self, so the entries for
|
||||||
// self are always None.
|
// self are always None.
|
||||||
|
|
|
@ -21,7 +21,7 @@ use default::Default;
|
||||||
use fmt::{self, Show};
|
use fmt::{self, Show};
|
||||||
use hash::{Hash, Hasher, RandomSipHasher};
|
use hash::{Hash, Hasher, RandomSipHasher};
|
||||||
use iter::{self, Iterator, IteratorExt, FromIterator, Extend, Map};
|
use iter::{self, Iterator, IteratorExt, FromIterator, Extend, Map};
|
||||||
use markers::Sized;
|
use marker::Sized;
|
||||||
use mem::{self, replace};
|
use mem::{self, replace};
|
||||||
use num::{Int, UnsignedInt};
|
use num::{Int, UnsignedInt};
|
||||||
use ops::{Deref, FnMut, Index, IndexMut};
|
use ops::{Deref, FnMut, Index, IndexMut};
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
use borrow::BorrowFrom;
|
use borrow::BorrowFrom;
|
||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
use cmp::{Eq, PartialEq};
|
use cmp::{Eq, PartialEq};
|
||||||
use core::markers::Sized;
|
use core::marker::Sized;
|
||||||
use default::Default;
|
use default::Default;
|
||||||
use fmt::Show;
|
use fmt::Show;
|
||||||
use fmt;
|
use fmt;
|
||||||
|
|
|
@ -16,7 +16,7 @@ use clone::Clone;
|
||||||
use cmp;
|
use cmp;
|
||||||
use hash::{Hash, Hasher};
|
use hash::{Hash, Hasher};
|
||||||
use iter::{Iterator, count};
|
use iter::{Iterator, count};
|
||||||
use markers::{Copy, Sized, self};
|
use marker::{Copy, Sized, self};
|
||||||
use mem::{min_align_of, size_of};
|
use mem::{min_align_of, size_of};
|
||||||
use mem;
|
use mem;
|
||||||
use num::{Int, UnsignedInt};
|
use num::{Int, UnsignedInt};
|
||||||
|
@ -72,7 +72,7 @@ pub struct RawTable<K, V> {
|
||||||
hashes: Unique<u64>,
|
hashes: Unique<u64>,
|
||||||
// Because K/V do not appear directly in any of the types in the struct,
|
// 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.
|
// 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> {
|
struct RawBucket<K, V> {
|
||||||
|
@ -562,7 +562,7 @@ impl<K, V> RawTable<K, V> {
|
||||||
size: 0,
|
size: 0,
|
||||||
capacity: 0,
|
capacity: 0,
|
||||||
hashes: Unique::null(),
|
hashes: Unique::null(),
|
||||||
marker: markers::CovariantType,
|
marker: marker::CovariantType,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// No need for `checked_mul` before a more restrictive check performed
|
// No need for `checked_mul` before a more restrictive check performed
|
||||||
|
@ -601,7 +601,7 @@ impl<K, V> RawTable<K, V> {
|
||||||
capacity: capacity,
|
capacity: capacity,
|
||||||
size: 0,
|
size: 0,
|
||||||
hashes: Unique(hashes),
|
hashes: Unique(hashes),
|
||||||
marker: markers::CovariantType,
|
marker: marker::CovariantType,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -651,7 +651,7 @@ impl<K, V> RawTable<K, V> {
|
||||||
hashes_end: unsafe {
|
hashes_end: unsafe {
|
||||||
self.hashes.0.offset(self.capacity as int)
|
self.hashes.0.offset(self.capacity as int)
|
||||||
},
|
},
|
||||||
marker: markers::ContravariantLifetime,
|
marker: marker::ContravariantLifetime,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -676,7 +676,7 @@ impl<K, V> RawTable<K, V> {
|
||||||
iter: RawBuckets {
|
iter: RawBuckets {
|
||||||
raw: raw,
|
raw: raw,
|
||||||
hashes_end: hashes_end,
|
hashes_end: hashes_end,
|
||||||
marker: markers::ContravariantLifetime,
|
marker: marker::ContravariantLifetime,
|
||||||
},
|
},
|
||||||
table: self,
|
table: self,
|
||||||
}
|
}
|
||||||
|
@ -689,7 +689,7 @@ impl<K, V> RawTable<K, V> {
|
||||||
iter: RawBuckets {
|
iter: RawBuckets {
|
||||||
raw: raw,
|
raw: raw,
|
||||||
hashes_end: hashes_end,
|
hashes_end: hashes_end,
|
||||||
marker: markers::ContravariantLifetime::<'static>,
|
marker: marker::ContravariantLifetime::<'static>,
|
||||||
},
|
},
|
||||||
table: self,
|
table: self,
|
||||||
}
|
}
|
||||||
|
@ -703,7 +703,7 @@ impl<K, V> RawTable<K, V> {
|
||||||
raw: raw_bucket.offset(self.capacity as int),
|
raw: raw_bucket.offset(self.capacity as int),
|
||||||
hashes_end: raw_bucket.hash,
|
hashes_end: raw_bucket.hash,
|
||||||
elems_left: self.size,
|
elems_left: self.size,
|
||||||
marker: markers::ContravariantLifetime,
|
marker: marker::ContravariantLifetime,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -713,7 +713,7 @@ impl<K, V> RawTable<K, V> {
|
||||||
struct RawBuckets<'a, K, V> {
|
struct RawBuckets<'a, K, V> {
|
||||||
raw: RawBucket<K, V>,
|
raw: RawBucket<K, V>,
|
||||||
hashes_end: *mut u64,
|
hashes_end: *mut u64,
|
||||||
marker: markers::ContravariantLifetime<'a>,
|
marker: marker::ContravariantLifetime<'a>,
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
|
// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
|
||||||
|
@ -722,7 +722,7 @@ impl<'a, K, V> Clone for RawBuckets<'a, K, V> {
|
||||||
RawBuckets {
|
RawBuckets {
|
||||||
raw: self.raw,
|
raw: self.raw,
|
||||||
hashes_end: self.hashes_end,
|
hashes_end: self.hashes_end,
|
||||||
marker: markers::ContravariantLifetime,
|
marker: marker::ContravariantLifetime,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -754,7 +754,7 @@ struct RevMoveBuckets<'a, K, V> {
|
||||||
raw: RawBucket<K, V>,
|
raw: RawBucket<K, V>,
|
||||||
hashes_end: *mut u64,
|
hashes_end: *mut u64,
|
||||||
elems_left: uint,
|
elems_left: uint,
|
||||||
marker: markers::ContravariantLifetime<'a>,
|
marker: marker::ContravariantLifetime<'a>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, K, V> Iterator for RevMoveBuckets<'a, K, V> {
|
impl<'a, K, V> Iterator for RevMoveBuckets<'a, K, V> {
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
pub use core::hash::{Hash, Hasher, Writer, hash, sip};
|
pub use core::hash::{Hash, Hasher, Writer, hash, sip};
|
||||||
|
|
||||||
use core::markers::Sized;
|
use core::marker::Sized;
|
||||||
use default::Default;
|
use default::Default;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
use rand;
|
use rand;
|
||||||
|
|
|
@ -232,7 +232,7 @@ use error::{FromError, Error};
|
||||||
use fmt;
|
use fmt;
|
||||||
use int;
|
use int;
|
||||||
use iter::{Iterator, IteratorExt};
|
use iter::{Iterator, IteratorExt};
|
||||||
use markers::Sized;
|
use marker::Sized;
|
||||||
use mem::transmute;
|
use mem::transmute;
|
||||||
use ops::FnOnce;
|
use ops::FnOnce;
|
||||||
use option::Option;
|
use option::Option;
|
||||||
|
|
|
@ -34,7 +34,7 @@ use failure::LOCAL_STDERR;
|
||||||
use fmt;
|
use fmt;
|
||||||
use io::{Reader, Writer, IoResult, IoError, OtherIoError, Buffer,
|
use io::{Reader, Writer, IoResult, IoError, OtherIoError, Buffer,
|
||||||
standard_error, EndOfFile, LineBufferedWriter, BufferedReader};
|
standard_error, EndOfFile, LineBufferedWriter, BufferedReader};
|
||||||
use markers::{Sync, Send};
|
use marker::{Sync, Send};
|
||||||
use libc;
|
use libc;
|
||||||
use mem;
|
use mem;
|
||||||
use option::Option;
|
use option::Option;
|
||||||
|
|
|
@ -151,7 +151,7 @@ extern crate libc;
|
||||||
|
|
||||||
// Make std testable by not duplicating lang items. See #2912
|
// Make std testable by not duplicating lang items. See #2912
|
||||||
#[cfg(test)] extern crate "std" as realstd;
|
#[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::ops;
|
||||||
#[cfg(test)] pub use realstd::cmp;
|
#[cfg(test)] pub use realstd::cmp;
|
||||||
#[cfg(test)] pub use realstd::boxed;
|
#[cfg(test)] pub use realstd::boxed;
|
||||||
|
@ -168,8 +168,8 @@ pub use core::default;
|
||||||
pub use core::finally;
|
pub use core::finally;
|
||||||
pub use core::intrinsics;
|
pub use core::intrinsics;
|
||||||
pub use core::iter;
|
pub use core::iter;
|
||||||
#[cfg(stage0)] #[cfg(not(test))] pub use core::markers as kinds;
|
#[cfg(stage0)] #[cfg(not(test))] pub use core::marker as kinds;
|
||||||
#[cfg(not(test))] pub use core::markers;
|
#[cfg(not(test))] pub use core::marker;
|
||||||
pub use core::mem;
|
pub use core::mem;
|
||||||
#[cfg(not(test))] pub use core::ops;
|
#[cfg(not(test))] pub use core::ops;
|
||||||
pub use core::ptr;
|
pub use core::ptr;
|
||||||
|
@ -313,8 +313,8 @@ mod std {
|
||||||
pub use cell; // used for tls!
|
pub use cell; // used for tls!
|
||||||
pub use thread_local; // used for thread_local!
|
pub use thread_local; // used for thread_local!
|
||||||
#[cfg(stage0)]
|
#[cfg(stage0)]
|
||||||
pub use markers as kinds;
|
pub use marker as kinds;
|
||||||
pub use markers; // used for tls!
|
pub use marker; // used for tls!
|
||||||
pub use ops; // used for bitflags!
|
pub use ops; // used for bitflags!
|
||||||
|
|
||||||
// The test runner calls ::std::os::args() but really wants realstd
|
// The test runner calls ::std::os::args() but really wants realstd
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#[cfg(test)] use fmt::Show;
|
#[cfg(test)] use fmt::Show;
|
||||||
use ops::{Add, Sub, Mul, Div, Rem, Neg};
|
use ops::{Add, Sub, Mul, Div, Rem, Neg};
|
||||||
|
|
||||||
use markers::Copy;
|
use marker::Copy;
|
||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
use cmp::{PartialOrd, PartialEq};
|
use cmp::{PartialOrd, PartialEq};
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ use error::{FromError, Error};
|
||||||
use fmt;
|
use fmt;
|
||||||
use io::{IoResult, IoError};
|
use io::{IoResult, IoError};
|
||||||
use iter::{Iterator, IteratorExt};
|
use iter::{Iterator, IteratorExt};
|
||||||
use markers::Copy;
|
use marker::Copy;
|
||||||
use libc::{c_void, c_int, c_char};
|
use libc::{c_void, c_int, c_char};
|
||||||
use libc;
|
use libc;
|
||||||
use boxed::Box;
|
use boxed::Box;
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
#![experimental]
|
#![experimental]
|
||||||
|
|
||||||
use core::markers::Sized;
|
use core::marker::Sized;
|
||||||
use ffi::CString;
|
use ffi::CString;
|
||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
use fmt;
|
use fmt;
|
||||||
|
|
|
@ -16,7 +16,7 @@ use hash;
|
||||||
use io::Writer;
|
use io::Writer;
|
||||||
use iter::{AdditiveIterator, Extend};
|
use iter::{AdditiveIterator, Extend};
|
||||||
use iter::{Iterator, IteratorExt, Map};
|
use iter::{Iterator, IteratorExt, Map};
|
||||||
use markers::Sized;
|
use marker::Sized;
|
||||||
use option::Option::{self, Some, None};
|
use option::Option::{self, Some, None};
|
||||||
use slice::{AsSlice, Split, SliceExt, SliceConcatExt};
|
use slice::{AsSlice, Split, SliceExt, SliceConcatExt};
|
||||||
use str::{self, FromStr, StrExt};
|
use str::{self, FromStr, StrExt};
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#![stable]
|
#![stable]
|
||||||
|
|
||||||
// Reexported core operators
|
// 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};
|
#[stable] #[doc(no_inline)] pub use ops::{Drop, Fn, FnMut, FnOnce};
|
||||||
|
|
||||||
// Reexported functions
|
// Reexported functions
|
||||||
|
|
|
@ -185,7 +185,7 @@ mod imp {
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
|
|
||||||
use io::{IoResult};
|
use io::{IoResult};
|
||||||
use markers::Sync;
|
use marker::Sync;
|
||||||
use mem;
|
use mem;
|
||||||
use os;
|
use os;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
use markers::Send;
|
use marker::Send;
|
||||||
use ops::FnOnce;
|
use ops::FnOnce;
|
||||||
use sys;
|
use sys;
|
||||||
use thunk::Thunk;
|
use thunk::Thunk;
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
use thread::Thread;
|
use thread::Thread;
|
||||||
use sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering};
|
use sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering};
|
||||||
use sync::Arc;
|
use sync::Arc;
|
||||||
use markers::{Sync, Send};
|
use marker::{Sync, Send};
|
||||||
use markers::{NoSend, NoSync};
|
use marker::{NoSend, NoSync};
|
||||||
use mem;
|
use mem;
|
||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
|
|
||||||
|
|
|
@ -319,7 +319,7 @@ use prelude::v1::*;
|
||||||
|
|
||||||
use sync::Arc;
|
use sync::Arc;
|
||||||
use fmt;
|
use fmt;
|
||||||
use markers;
|
use marker;
|
||||||
use mem;
|
use mem;
|
||||||
use cell::UnsafeCell;
|
use cell::UnsafeCell;
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ unsafe impl<T:Send> Send for Sender<T> { }
|
||||||
pub struct SyncSender<T> {
|
pub struct SyncSender<T> {
|
||||||
inner: Arc<RacyCell<sync::Packet<T>>>,
|
inner: Arc<RacyCell<sync::Packet<T>>>,
|
||||||
// can't share in an arc
|
// can't share in an arc
|
||||||
_marker: markers::NoSync,
|
_marker: marker::NoSync,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An error returned from the `send` function on channels.
|
/// An error returned from the `send` function on channels.
|
||||||
|
@ -678,7 +678,7 @@ impl<T: Send> Drop for Sender<T> {
|
||||||
|
|
||||||
impl<T: Send> SyncSender<T> {
|
impl<T: Send> SyncSender<T> {
|
||||||
fn new(inner: Arc<RacyCell<sync::Packet<T>>>) -> 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.
|
/// Sends a value on this synchronous channel.
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
use core::prelude::*;
|
use core::prelude::*;
|
||||||
|
|
||||||
use core::cell::Cell;
|
use core::cell::Cell;
|
||||||
use core::markers;
|
use core::marker;
|
||||||
use core::mem;
|
use core::mem;
|
||||||
use core::uint;
|
use core::uint;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ pub struct Select {
|
||||||
head: *mut Handle<'static, ()>,
|
head: *mut Handle<'static, ()>,
|
||||||
tail: *mut Handle<'static, ()>,
|
tail: *mut Handle<'static, ()>,
|
||||||
next_id: Cell<uint>,
|
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
|
/// 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.
|
/// rather much easier through the `select!` macro.
|
||||||
pub fn new() -> Select {
|
pub fn new() -> Select {
|
||||||
Select {
|
Select {
|
||||||
marker1: markers::NoSend,
|
marker1: marker::NoSend,
|
||||||
head: 0 as *mut Handle<'static, ()>,
|
head: 0 as *mut Handle<'static, ()>,
|
||||||
tail: 0 as *mut Handle<'static, ()>,
|
tail: 0 as *mut Handle<'static, ()>,
|
||||||
next_id: Cell::new(1),
|
next_id: Cell::new(1),
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
use prelude::v1::*;
|
use prelude::v1::*;
|
||||||
|
|
||||||
use cell::UnsafeCell;
|
use cell::UnsafeCell;
|
||||||
use markers;
|
use marker;
|
||||||
use ops::{Deref, DerefMut};
|
use ops::{Deref, DerefMut};
|
||||||
use sync::poison::{self, TryLockError, TryLockResult, LockResult};
|
use sync::poison::{self, TryLockError, TryLockResult, LockResult};
|
||||||
use sys_common::mutex as sys;
|
use sys_common::mutex as sys;
|
||||||
|
@ -166,7 +166,7 @@ pub struct MutexGuard<'a, T: 'a> {
|
||||||
__lock: &'a StaticMutex,
|
__lock: &'a StaticMutex,
|
||||||
__data: &'a UnsafeCell<T>,
|
__data: &'a UnsafeCell<T>,
|
||||||
__poison: poison::Guard,
|
__poison: poison::Guard,
|
||||||
__marker: markers::NoSend,
|
__marker: marker::NoSend,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Static initialization of a mutex. This constant can be used to initialize
|
/// Static initialization of a mutex. This constant can be used to initialize
|
||||||
|
@ -286,7 +286,7 @@ impl<'mutex, T> MutexGuard<'mutex, T> {
|
||||||
__lock: lock,
|
__lock: lock,
|
||||||
__data: data,
|
__data: data,
|
||||||
__poison: guard,
|
__poison: guard,
|
||||||
__marker: markers::NoSend,
|
__marker: marker::NoSend,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
//! example use case would be for initializing an FFI library.
|
//! example use case would be for initializing an FFI library.
|
||||||
|
|
||||||
use int;
|
use int;
|
||||||
use markers::Sync;
|
use marker::Sync;
|
||||||
use mem::drop;
|
use mem::drop;
|
||||||
use ops::FnOnce;
|
use ops::FnOnce;
|
||||||
use sync::atomic::{AtomicInt, Ordering, ATOMIC_INT_INIT};
|
use sync::atomic::{AtomicInt, Ordering, ATOMIC_INT_INIT};
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
use prelude::v1::*;
|
use prelude::v1::*;
|
||||||
|
|
||||||
use cell::UnsafeCell;
|
use cell::UnsafeCell;
|
||||||
use markers;
|
use marker;
|
||||||
use ops::{Deref, DerefMut};
|
use ops::{Deref, DerefMut};
|
||||||
use sync::poison::{self, LockResult, TryLockError, TryLockResult};
|
use sync::poison::{self, LockResult, TryLockError, TryLockResult};
|
||||||
use sys_common::rwlock as sys;
|
use sys_common::rwlock as sys;
|
||||||
|
@ -113,7 +113,7 @@ pub const RW_LOCK_INIT: StaticRwLock = StaticRwLock {
|
||||||
pub struct RwLockReadGuard<'a, T: 'a> {
|
pub struct RwLockReadGuard<'a, T: 'a> {
|
||||||
__lock: &'a StaticRwLock,
|
__lock: &'a StaticRwLock,
|
||||||
__data: &'a UnsafeCell<T>,
|
__data: &'a UnsafeCell<T>,
|
||||||
__marker: markers::NoSend,
|
__marker: marker::NoSend,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// RAII structure used to release the exclusive write access of a lock when
|
/// 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,
|
__lock: &'a StaticRwLock,
|
||||||
__data: &'a UnsafeCell<T>,
|
__data: &'a UnsafeCell<T>,
|
||||||
__poison: poison::Guard,
|
__poison: poison::Guard,
|
||||||
__marker: markers::NoSend,
|
__marker: marker::NoSend,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Send + Sync> RwLock<T> {
|
impl<T: Send + Sync> RwLock<T> {
|
||||||
|
@ -309,7 +309,7 @@ impl<'rwlock, T> RwLockReadGuard<'rwlock, T> {
|
||||||
RwLockReadGuard {
|
RwLockReadGuard {
|
||||||
__lock: lock,
|
__lock: lock,
|
||||||
__data: data,
|
__data: data,
|
||||||
__marker: markers::NoSend,
|
__marker: marker::NoSend,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -322,7 +322,7 @@ impl<'rwlock, T> RwLockWriteGuard<'rwlock, T> {
|
||||||
__lock: lock,
|
__lock: lock,
|
||||||
__data: data,
|
__data: data,
|
||||||
__poison: guard,
|
__poison: guard,
|
||||||
__marker: markers::NoSend,
|
__marker: marker::NoSend,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use markers::Sync;
|
use marker::Sync;
|
||||||
use sys::mutex as imp;
|
use sys::mutex as imp;
|
||||||
|
|
||||||
/// An OS-based mutual exclusion lock.
|
/// An OS-based mutual exclusion lock.
|
||||||
|
|
|
@ -165,8 +165,8 @@ mod signal {
|
||||||
sa_restorer: *mut libc::c_void,
|
sa_restorer: *mut libc::c_void,
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe impl ::markers::Send for sigaction { }
|
unsafe impl ::marker::Send for sigaction { }
|
||||||
unsafe impl ::markers::Sync for sigaction { }
|
unsafe impl ::marker::Sync for sigaction { }
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[cfg(target_word_size = "32")]
|
#[cfg(target_word_size = "32")]
|
||||||
|
@ -217,8 +217,8 @@ mod signal {
|
||||||
sa_resv: [libc::c_int; 1],
|
sa_resv: [libc::c_int; 1],
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe impl ::markers::Send for sigaction { }
|
unsafe impl ::marker::Send for sigaction { }
|
||||||
unsafe impl ::markers::Sync for sigaction { }
|
unsafe impl ::marker::Sync for sigaction { }
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct sigset_t {
|
pub struct sigset_t {
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use cell::UnsafeCell;
|
use cell::UnsafeCell;
|
||||||
use markers::Sync;
|
use marker::Sync;
|
||||||
use sys::sync as ffi;
|
use sys::sync as ffi;
|
||||||
use sys_common::mutex;
|
use sys_common::mutex;
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ use any::Any;
|
||||||
use boxed::Box;
|
use boxed::Box;
|
||||||
use cell::UnsafeCell;
|
use cell::UnsafeCell;
|
||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
use markers::{Send, Sync};
|
use marker::{Send, Sync};
|
||||||
use ops::{Drop, FnOnce};
|
use ops::{Drop, FnOnce};
|
||||||
use option::Option::{self, Some, None};
|
use option::Option::{self, Some, None};
|
||||||
use result::Result::{Err, Ok};
|
use result::Result::{Err, Ok};
|
||||||
|
|
|
@ -346,7 +346,7 @@ mod imp {
|
||||||
pub dtor_running: UnsafeCell<bool>, // should be Cell
|
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)]
|
#[doc(hidden)]
|
||||||
impl<T> Key<T> {
|
impl<T> Key<T> {
|
||||||
|
@ -472,7 +472,7 @@ mod imp {
|
||||||
pub os: OsStaticKey,
|
pub os: OsStaticKey,
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe impl<T> ::markers::Sync for Key<T> { }
|
unsafe impl<T> ::marker::Sync for Key<T> { }
|
||||||
|
|
||||||
struct Value<T: 'static> {
|
struct Value<T: 'static> {
|
||||||
key: &'static Key<T>,
|
key: &'static Key<T>,
|
||||||
|
|
|
@ -108,7 +108,7 @@ macro_rules! __scoped_thread_local_inner {
|
||||||
const _INIT: __Key<$t> = __Key {
|
const _INIT: __Key<$t> = __Key {
|
||||||
inner: ::std::thread_local::scoped::__impl::KeyInner {
|
inner: ::std::thread_local::scoped::__impl::KeyInner {
|
||||||
inner: ::std::thread_local::scoped::__impl::OS_INIT,
|
inner: ::std::thread_local::scoped::__impl::OS_INIT,
|
||||||
marker: ::std::markers::InvariantType,
|
marker: ::std::marker::InvariantType,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ mod imp {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub struct KeyInner<T> { pub inner: UnsafeCell<*mut T> }
|
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)]
|
#[doc(hidden)]
|
||||||
impl<T> KeyInner<T> {
|
impl<T> KeyInner<T> {
|
||||||
|
@ -224,16 +224,16 @@ mod imp {
|
||||||
|
|
||||||
#[cfg(any(windows, target_os = "android", target_os = "ios", target_arch = "aarch64"))]
|
#[cfg(any(windows, target_os = "android", target_os = "ios", target_arch = "aarch64"))]
|
||||||
mod imp {
|
mod imp {
|
||||||
use markers;
|
use marker;
|
||||||
use sys_common::thread_local::StaticKey as OsStaticKey;
|
use sys_common::thread_local::StaticKey as OsStaticKey;
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub struct KeyInner<T> {
|
pub struct KeyInner<T> {
|
||||||
pub inner: OsStaticKey,
|
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)]
|
#[doc(hidden)]
|
||||||
impl<T> KeyInner<T> {
|
impl<T> KeyInner<T> {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#![allow(missing_docs)]
|
#![allow(missing_docs)]
|
||||||
|
|
||||||
use alloc::boxed::Box;
|
use alloc::boxed::Box;
|
||||||
use core::markers::Send;
|
use core::marker::Send;
|
||||||
use core::ops::FnOnce;
|
use core::ops::FnOnce;
|
||||||
|
|
||||||
pub struct Thunk<A=(),R=()> {
|
pub struct Thunk<A=(),R=()> {
|
||||||
|
|
|
@ -47,7 +47,7 @@ pub fn expand_deriving_bound<F>(cx: &mut ExtCtxt,
|
||||||
let trait_def = TraitDef {
|
let trait_def = TraitDef {
|
||||||
span: span,
|
span: span,
|
||||||
attributes: Vec::new(),
|
attributes: Vec::new(),
|
||||||
path: Path::new(vec!("std", "markers", name)),
|
path: Path::new(vec!("std", "marker", name)),
|
||||||
additional_bounds: Vec::new(),
|
additional_bounds: Vec::new(),
|
||||||
generics: LifetimeBounds::empty(),
|
generics: LifetimeBounds::empty(),
|
||||||
methods: vec!()
|
methods: vec!()
|
||||||
|
|
|
@ -7801,7 +7801,7 @@ pub mod charwidth {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod grapheme {
|
pub mod grapheme {
|
||||||
use core::markers::Copy;
|
use core::marker::Copy;
|
||||||
use core::slice::SliceExt;
|
use core::slice::SliceExt;
|
||||||
pub use self::GraphemeCat::*;
|
pub use self::GraphemeCat::*;
|
||||||
use core::result::Result::{Ok, Err};
|
use core::result::Result::{Ok, Err};
|
||||||
|
|
|
@ -14,7 +14,7 @@ trait Get {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn foo<T:Get>(t: T) {
|
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() {
|
fn main() {
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
fn foo<T:'static>() {
|
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 {
|
trait bar {
|
||||||
|
|
|
@ -16,8 +16,8 @@ trait Trait {}
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
let x: Vec<Trait + Sized> = Vec::new();
|
let x: Vec<Trait + Sized> = Vec::new();
|
||||||
//~^ ERROR the trait `core::markers::Sized` is not implemented
|
//~^ ERROR the trait `core::marker::Sized` is not implemented
|
||||||
//~^^ ERROR the trait `core::markers::Sized` is not implemented
|
//~^^ ERROR the trait `core::marker::Sized` is not implemented
|
||||||
let x: Vec<Box<RefCell<Trait + Sized>>> = Vec::new();
|
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
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,14 +10,14 @@
|
||||||
|
|
||||||
// Ensure that moves out of static items is forbidden
|
// Ensure that moves out of static items is forbidden
|
||||||
|
|
||||||
use std::markers;
|
use std::marker;
|
||||||
|
|
||||||
struct Foo {
|
struct Foo {
|
||||||
foo: int,
|
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) {
|
fn test(f: Foo) {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// move, when the struct implements Drop.
|
// move, when the struct implements Drop.
|
||||||
|
|
||||||
// NoCopy
|
// NoCopy
|
||||||
use std::markers::NoCopy as NP;
|
use std::marker::NoCopy as NP;
|
||||||
|
|
||||||
|
|
||||||
struct S { a: int, np: NP }
|
struct S { a: int, np: NP }
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
|
|
||||||
trait Foo : Send+Sync { }
|
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)
|
impl <T: Send+Sync> Foo for (T,T,T) { } // (ok)
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,6 @@ struct X<T>(T);
|
||||||
impl <T:Sync> RequiresShare for X<T> { }
|
impl <T:Sync> RequiresShare for X<T> { }
|
||||||
|
|
||||||
impl <T:Sync+'static> RequiresRequiresShareAndSend 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() { }
|
fn main() { }
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
|
|
||||||
trait Foo : Send { }
|
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() { }
|
fn main() { }
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
// Verifies all possible restrictions for statics values.
|
// Verifies all possible restrictions for statics values.
|
||||||
|
|
||||||
use std::markers;
|
use std::marker;
|
||||||
|
|
||||||
struct WithDtor;
|
struct WithDtor;
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ struct X<F> where F: FnOnce() + 'static + Send {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
|
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 };
|
return X { field: blk };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ fn give_any<F>(f: F) where F: FnOnce() {
|
||||||
|
|
||||||
fn give_owned<F>(f: F) where F: FnOnce() + Send {
|
fn give_owned<F>(f: F) where F: FnOnce() + Send {
|
||||||
take_any(f);
|
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() {}
|
fn main() {}
|
||||||
|
|
|
@ -13,5 +13,5 @@ use std::sync::mpsc::Receiver;
|
||||||
fn test<T: Sync>() {}
|
fn test<T: Sync>() {}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
test::<Receiver<int>>(); //~ ERROR: `core::markers::Sync` is not implemented
|
test::<Receiver<int>>(); //~ ERROR: `core::marker::Sync` is not implemented
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,5 +13,5 @@ use std::sync::mpsc::Sender;
|
||||||
fn test<T: Sync>() {}
|
fn test<T: Sync>() {}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
test::<Sender<int>>(); //~ ERROR: `core::markers::Sync` is not implemented
|
test::<Sender<int>>(); //~ ERROR: `core::marker::Sync` is not implemented
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,5 +43,5 @@ pub fn main() {
|
||||||
let f5: &mut Fat<ToBar> = &mut Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
|
let f5: &mut Fat<ToBar> = &mut Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
|
||||||
let z: Box<ToBar> = box Bar1 {f: 36};
|
let z: Box<ToBar> = box Bar1 {f: 36};
|
||||||
f5.ptr = *z;
|
f5.ptr = *z;
|
||||||
//~^ ERROR the trait `core::markers::Sized` is not implemented
|
//~^ ERROR the trait `core::marker::Sized` is not implemented
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,5 +43,5 @@ pub fn main() {
|
||||||
let f5: &mut Fat<ToBar> = &mut Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
|
let f5: &mut Fat<ToBar> = &mut Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
|
||||||
let z: Box<ToBar> = box Bar1 {f: 36};
|
let z: Box<ToBar> = box Bar1 {f: 36};
|
||||||
f5.ptr = Bar1 {f: 36}; //~ ERROR mismatched types: expected `ToBar`, found `Bar1`
|
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`
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,5 +21,5 @@ pub fn main() {
|
||||||
let f: Fat<[int; 3]> = Fat { ptr: [5i, 6, 7] };
|
let f: Fat<[int; 3]> = Fat { ptr: [5i, 6, 7] };
|
||||||
let g: &Fat<[int]> = &f;
|
let g: &Fat<[int]> = &f;
|
||||||
let h: &Fat<Fat<[int]>> = &Fat { ptr: *g };
|
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
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,22 +15,22 @@ impl Foo for str {}
|
||||||
|
|
||||||
fn test1<T: ?Sized + Foo>(t: &T) {
|
fn test1<T: ?Sized + Foo>(t: &T) {
|
||||||
let u: &Foo = 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) {
|
fn test2<T: ?Sized + Foo>(t: &T) {
|
||||||
let v: &Foo = t as &Foo;
|
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() {
|
fn test3() {
|
||||||
let _: &[&Foo] = &["hi"];
|
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() {
|
fn test4() {
|
||||||
let _: &Foo = "hi" as &Foo;
|
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() { }
|
fn main() { }
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
|
trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
|
||||||
|
|
||||||
impl Foo<[int]> for uint { }
|
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] { }
|
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() { }
|
pub fn main() { }
|
||||||
|
|
|
@ -13,5 +13,5 @@
|
||||||
fn check_bound<T:Copy>(_: T) {}
|
fn check_bound<T:Copy>(_: T) {}
|
||||||
|
|
||||||
fn main() {
|
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
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,5 +10,5 @@
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let _x = "test" as &::std::any::Any;
|
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`
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ fn dft_iter<'a, T>(arg1: Chunks<'a,T>, arg2: ChunksMut<'a,T>)
|
||||||
{
|
{
|
||||||
for
|
for
|
||||||
&something
|
&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
|
in arg2
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,6 @@ mod Y {
|
||||||
|
|
||||||
static foo: *const Y::X = Y::foo(Y::x as *const Y::X);
|
static foo: *const Y::X = Y::foo(Y::x as *const Y::X);
|
||||||
//~^ ERROR cannot refer to other statics by value
|
//~^ 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() {}
|
fn main() {}
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use std::markers;
|
use std::marker;
|
||||||
|
|
||||||
struct Foo { nc: markers::NoCopy }
|
struct Foo { nc: marker::NoCopy }
|
||||||
const INIT: Foo = Foo { nc: markers::NoCopy };
|
const INIT: Foo = Foo { nc: marker::NoCopy };
|
||||||
static FOO: Foo = INIT;
|
static FOO: Foo = INIT;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// 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 FOO: uint = 3;
|
||||||
static BAR: Foo = Foo { marker: markers::NoSync };
|
static BAR: Foo = Foo { marker: marker::NoSync };
|
||||||
//~^ ERROR: the trait `core::markers::Sync` is not implemented
|
//~^ ERROR: the trait `core::marker::Sync` is not implemented
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -14,7 +14,7 @@ pub trait AbstractRenderer {}
|
||||||
|
|
||||||
fn _create_render(_: &()) ->
|
fn _create_render(_: &()) ->
|
||||||
AbstractRenderer
|
AbstractRenderer
|
||||||
//~^ ERROR: the trait `core::markers::Sized` is not implemented
|
//~^ ERROR: the trait `core::marker::Sized` is not implemented
|
||||||
{
|
{
|
||||||
match 0u {
|
match 0u {
|
||||||
_ => unimplemented!()
|
_ => unimplemented!()
|
||||||
|
|
|
@ -18,13 +18,13 @@ trait To {
|
||||||
// This is a typo, the return type should be `<Dst as From<Self>>::Output`
|
// This is a typo, the return type should be `<Dst as From<Self>>::Output`
|
||||||
fn to<Dst: From<Self>>(
|
fn to<Dst: From<Self>>(
|
||||||
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
|
<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(
|
From::from(
|
||||||
//~^ error: the trait `core::markers::Sized` is not implemented
|
//~^ error: the trait `core::marker::Sized` is not implemented
|
||||||
self
|
self
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,9 +16,9 @@ trait From<Src> {
|
||||||
|
|
||||||
trait To {
|
trait To {
|
||||||
fn to<Dst>(
|
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> {
|
) -> <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
|
self
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,6 @@ struct S {
|
||||||
name: int
|
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() {}
|
fn main() {}
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
trait I {}
|
trait I {}
|
||||||
type K = I+'static;
|
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() {}
|
fn main() {}
|
||||||
|
|
|
@ -14,5 +14,5 @@ impl Foo for u8 {}
|
||||||
fn main() {
|
fn main() {
|
||||||
let r: Box<Foo> = box 5;
|
let r: Box<Foo> = box 5;
|
||||||
let _m: Box<Foo> = r as Box<Foo>;
|
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`
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,8 @@ struct Struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_struct(r: A+'static)
|
fn new_struct(r: A+'static)
|
||||||
-> Struct { //~^ ERROR the trait `core::markers::Sized` is not implemented
|
-> Struct { //~^ ERROR the trait `core::marker::Sized` is not implemented
|
||||||
//~^ ERROR the trait `core::markers::Sized` is not implemented
|
//~^ ERROR the trait `core::marker::Sized` is not implemented
|
||||||
Struct { r: r }
|
Struct { r: r }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,6 @@ struct A {
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let a = A {v: box B{v: None} as Box<Foo+Send>};
|
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::marker::Send` is not implemented
|
||||||
//~^^ ERROR the trait `core::markers::Send` is not implemented
|
//~^^ ERROR the trait `core::marker::Send` is not implemented
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ use std::cell::RefCell;
|
||||||
// Regresion test for issue 7364
|
// Regresion test for issue 7364
|
||||||
static boxed: Box<RefCell<int>> = box RefCell::new(0);
|
static boxed: Box<RefCell<int>> = box RefCell::new(0);
|
||||||
//~^ ERROR statics are not allowed to have custom pointers
|
//~^ 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::marker::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
|
||||||
|
|
||||||
fn main() { }
|
fn main() { }
|
||||||
|
|
|
@ -36,14 +36,14 @@ fn test<'a,T,U:Copy>(_: &'a int) {
|
||||||
assert_copy::<&'a [int]>();
|
assert_copy::<&'a [int]>();
|
||||||
|
|
||||||
// ...unless they are mutable
|
// ...unless they are mutable
|
||||||
assert_copy::<&'static 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::markers::Copy` is not implemented
|
assert_copy::<&'a mut int>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||||
|
|
||||||
// ~ pointers are not ok
|
// ~ pointers are not ok
|
||||||
assert_copy::<Box<int>>(); //~ ERROR `core::markers::Copy` is not implemented
|
assert_copy::<Box<int>>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||||
assert_copy::<String>(); //~ ERROR `core::markers::Copy` is not implemented
|
assert_copy::<String>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||||
assert_copy::<Vec<int> >(); //~ ERROR `core::markers::Copy` is not implemented
|
assert_copy::<Vec<int> >(); //~ ERROR `core::marker::Copy` is not implemented
|
||||||
assert_copy::<Box<&'a mut int>>(); //~ ERROR `core::markers::Copy` is not implemented
|
assert_copy::<Box<&'a mut int>>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||||
|
|
||||||
// borrowed object types are generally ok
|
// borrowed object types are generally ok
|
||||||
assert_copy::<&'a Dummy>();
|
assert_copy::<&'a Dummy>();
|
||||||
|
@ -51,11 +51,11 @@ fn test<'a,T,U:Copy>(_: &'a int) {
|
||||||
assert_copy::<&'static (Dummy+Copy)>();
|
assert_copy::<&'static (Dummy+Copy)>();
|
||||||
|
|
||||||
// owned object types are not ok
|
// owned object types are not ok
|
||||||
assert_copy::<Box<Dummy>>(); //~ 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::markers::Copy` is not implemented
|
assert_copy::<Box<Dummy+Copy>>(); //~ ERROR `core::marker::Copy` is not implemented
|
||||||
|
|
||||||
// mutable object types are not ok
|
// 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
|
// unsafe ptrs are ok
|
||||||
assert_copy::<*const int>();
|
assert_copy::<*const int>();
|
||||||
|
@ -73,10 +73,10 @@ fn test<'a,T,U:Copy>(_: &'a int) {
|
||||||
assert_copy::<MyStruct>();
|
assert_copy::<MyStruct>();
|
||||||
|
|
||||||
// structs containing non-POD are not ok
|
// 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
|
// 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() {
|
pub fn main() {
|
||||||
|
|
|
@ -19,5 +19,5 @@ fn take_param<T:Foo>(foo: &T) { }
|
||||||
fn main() {
|
fn main() {
|
||||||
let x = box 3i;
|
let x = box 3i;
|
||||||
take_param(&x);
|
take_param(&x);
|
||||||
//~^ ERROR the trait `core::markers::Copy` is not implemented
|
//~^ ERROR the trait `core::marker::Copy` is not implemented
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,15 +20,15 @@ impl<T: Send + Copy> Gettable<T> for S<T> {}
|
||||||
fn f<T>(val: T) {
|
fn f<T>(val: T) {
|
||||||
let t: S<T> = S;
|
let t: S<T> = S;
|
||||||
let a = &t as &Gettable<T>;
|
let a = &t as &Gettable<T>;
|
||||||
//~^ ERROR the trait `core::markers::Send` is not implemented
|
//~^ ERROR the trait `core::marker::Send` is not implemented
|
||||||
//~^^ ERROR the trait `core::markers::Copy` is not implemented
|
//~^^ ERROR the trait `core::marker::Copy` is not implemented
|
||||||
}
|
}
|
||||||
|
|
||||||
fn g<T>(val: T) {
|
fn g<T>(val: T) {
|
||||||
let t: S<T> = S;
|
let t: S<T> = S;
|
||||||
let a: &Gettable<T> = &t;
|
let a: &Gettable<T> = &t;
|
||||||
//~^ ERROR the trait `core::markers::Send` is not implemented
|
//~^ ERROR the trait `core::marker::Send` is not implemented
|
||||||
//~^^ ERROR the trait `core::markers::Copy` is not implemented
|
//~^^ ERROR the trait `core::marker::Copy` is not implemented
|
||||||
}
|
}
|
||||||
|
|
||||||
fn foo<'a>() {
|
fn foo<'a>() {
|
||||||
|
@ -40,13 +40,13 @@ fn foo<'a>() {
|
||||||
fn foo2<'a>() {
|
fn foo2<'a>() {
|
||||||
let t: Box<S<String>> = box S;
|
let t: Box<S<String>> = box S;
|
||||||
let a = t as Box<Gettable<String>>;
|
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>() {
|
fn foo3<'a>() {
|
||||||
let t: Box<S<String>> = box S;
|
let t: Box<S<String>> = box S;
|
||||||
let a: Box<Gettable<String>> = t;
|
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() { }
|
fn main() { }
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue