Skip to content

Commit 5037097

Browse files
committed
Change std::kinds to std::markers; flatten std::kinds::marker
[breaking-change]
1 parent 6539cb4 commit 5037097

File tree

154 files changed

+635
-623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+635
-623
lines changed

src/doc/guide-unsafe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,10 +703,10 @@ Other features provided by lang items include:
703703
`deref`, and `add` respectively.
704704
- stack unwinding and general failure; the `eh_personality`, `fail`
705705
and `fail_bounds_checks` lang items.
706-
- the traits in `std::kinds` used to indicate types that satisfy
706+
- the traits in `std::markers` used to indicate types of
707707
various kinds; lang items `send`, `sync` and `copy`.
708708
- the marker types and variance indicators found in
709-
`std::kinds::markers`; lang items `covariant_type`,
709+
`std::markers`; lang items `covariant_type`,
710710
`contravariant_lifetime`, `no_sync_bound`, etc.
711711

712712
Lang items are loaded lazily by the compiler; e.g. if one never uses

src/liballoc/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ use core::clone::Clone;
7474
use core::fmt::{self, Show};
7575
use core::cmp::{Eq, Ord, PartialEq, PartialOrd, Ordering};
7676
use core::default::Default;
77-
use core::kinds::{Sync, Send};
77+
use core::markers::{Sync, Send};
7878
use core::mem::{min_align_of, size_of, drop};
7979
use core::mem;
8080
use core::nonzero::NonZero;

src/liballoc/boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use core::cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering};
1818
use core::default::Default;
1919
use core::fmt;
2020
use core::hash::{self, Hash};
21-
use core::kinds::Sized;
21+
use core::markers::Sized;
2222
use core::mem;
2323
use core::option::Option;
2424
use core::ptr::Unique;

src/liballoc/rc.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ use core::cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering};
148148
use core::default::Default;
149149
use core::fmt;
150150
use core::hash::{self, Hash};
151-
use core::kinds::marker;
151+
use core::markers;
152152
use core::mem::{transmute, min_align_of, size_of, forget};
153153
use core::nonzero::NonZero;
154154
use core::ops::{Deref, Drop};
@@ -175,8 +175,8 @@ pub struct Rc<T> {
175175
// FIXME #12808: strange names to try to avoid interfering with field accesses of the contained
176176
// type via Deref
177177
_ptr: NonZero<*mut RcBox<T>>,
178-
_nosend: marker::NoSend,
179-
_noshare: marker::NoSync
178+
_nosend: markers::NoSend,
179+
_noshare: markers::NoSync
180180
}
181181

182182
impl<T> Rc<T> {
@@ -201,8 +201,8 @@ impl<T> Rc<T> {
201201
strong: Cell::new(1),
202202
weak: Cell::new(1)
203203
})),
204-
_nosend: marker::NoSend,
205-
_noshare: marker::NoSync
204+
_nosend: markers::NoSend,
205+
_noshare: markers::NoSync
206206
}
207207
}
208208
}
@@ -223,8 +223,8 @@ impl<T> Rc<T> {
223223
self.inc_weak();
224224
Weak {
225225
_ptr: self._ptr,
226-
_nosend: marker::NoSend,
227-
_noshare: marker::NoSync
226+
_nosend: markers::NoSend,
227+
_noshare: markers::NoSync
228228
}
229229
}
230230
}
@@ -431,7 +431,7 @@ impl<T> Clone for Rc<T> {
431431
#[inline]
432432
fn clone(&self) -> Rc<T> {
433433
self.inc_strong();
434-
Rc { _ptr: self._ptr, _nosend: marker::NoSend, _noshare: marker::NoSync }
434+
Rc { _ptr: self._ptr, _nosend: markers::NoSend, _noshare: markers::NoSync }
435435
}
436436
}
437437

@@ -622,8 +622,8 @@ pub struct Weak<T> {
622622
// FIXME #12808: strange names to try to avoid interfering with
623623
// field accesses of the contained type via Deref
624624
_ptr: NonZero<*mut RcBox<T>>,
625-
_nosend: marker::NoSend,
626-
_noshare: marker::NoSync
625+
_nosend: markers::NoSend,
626+
_noshare: markers::NoSync
627627
}
628628

629629
#[experimental = "Weak pointers may not belong in this module."]
@@ -650,7 +650,7 @@ impl<T> Weak<T> {
650650
None
651651
} else {
652652
self.inc_strong();
653-
Some(Rc { _ptr: self._ptr, _nosend: marker::NoSend, _noshare: marker::NoSync })
653+
Some(Rc { _ptr: self._ptr, _nosend: markers::NoSend, _noshare: markers::NoSync })
654654
}
655655
}
656656
}
@@ -717,7 +717,7 @@ impl<T> Clone for Weak<T> {
717717
#[inline]
718718
fn clone(&self) -> Weak<T> {
719719
self.inc_weak();
720-
Weak { _ptr: self._ptr, _nosend: marker::NoSend, _noshare: marker::NoSync }
720+
Weak { _ptr: self._ptr, _nosend: markers::NoSend, _noshare: markers::NoSync }
721721
}
722722
}
723723

src/libcollections/btree/map.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ enum Continuation<A, B> {
480480
/// boilerplate gets cut out.
481481
mod stack {
482482
use core::prelude::*;
483-
use core::kinds::marker;
483+
use core::markers;
484484
use core::mem;
485485
use core::ops::{Deref, DerefMut};
486486
use super::BTreeMap;
@@ -494,7 +494,7 @@ mod stack {
494494
/// where `&'static` can be used in any function expecting any lifetime reference.
495495
pub struct IdRef<'id, T: 'id> {
496496
inner: &'id mut T,
497-
marker: marker::InvariantLifetime<'id>
497+
marker: markers::InvariantLifetime<'id>
498498
}
499499

500500
impl<'id, T> Deref for IdRef<'id, T> {
@@ -536,7 +536,7 @@ mod stack {
536536
pub struct Pusher<'id, 'a, K:'a, V:'a> {
537537
map: &'a mut BTreeMap<K, V>,
538538
stack: Stack<K, V>,
539-
marker: marker::InvariantLifetime<'id>
539+
marker: markers::InvariantLifetime<'id>
540540
}
541541

542542
impl<'a, K, V> PartialSearchStack<'a, K, V> {
@@ -571,11 +571,11 @@ mod stack {
571571
let pusher = Pusher {
572572
map: self.map,
573573
stack: self.stack,
574-
marker: marker::InvariantLifetime
574+
marker: markers::InvariantLifetime
575575
};
576576
let node = IdRef {
577577
inner: unsafe { &mut *self.next },
578-
marker: marker::InvariantLifetime
578+
marker: markers::InvariantLifetime
579579
};
580580

581581
closure(pusher, node)

src/libcollections/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ mod std {
123123
pub use core::option; // necessary for panic!()
124124
pub use core::clone; // deriving(Clone)
125125
pub use core::cmp; // deriving(Eq, Ord, etc.)
126-
pub use core::kinds; // deriving(Copy)
126+
#[cfg(stage0)]
127+
pub use core::markers as kinds;
128+
pub use core::markers; // deriving(Copy)
127129
pub use core::hash; // deriving(Hash)
128130
}
129131

@@ -138,7 +140,7 @@ mod prelude {
138140
pub use core::iter::{FromIterator, Extend, IteratorExt};
139141
pub use core::iter::{Iterator, DoubleEndedIterator, RandomAccessIterator};
140142
pub use core::iter::{ExactSizeIterator};
141-
pub use core::kinds::{Copy, Send, Sized, Sync};
143+
pub use core::markers::{Copy, Send, Sized, Sync};
142144
pub use core::mem::drop;
143145
pub use core::ops::{Drop, Fn, FnMut, FnOnce};
144146
pub use core::option::Option;

src/libcollections/ring_buf.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use core::cmp::Ordering;
2020
use core::default::Default;
2121
use core::fmt;
2222
use core::iter::{self, repeat, FromIterator, RandomAccessIterator};
23-
use core::kinds::marker;
23+
use core::markers;
2424
use core::mem;
2525
use core::num::{Int, UnsignedInt};
2626
use core::ops::{Index, IndexMut};
@@ -534,7 +534,7 @@ impl<T> RingBuf<T> {
534534
head: self.head,
535535
cap: self.cap,
536536
ptr: self.ptr,
537-
marker: marker::ContravariantLifetime::<'a>,
537+
marker: markers::ContravariantLifetime::<'a>,
538538
}
539539
}
540540

@@ -1414,7 +1414,7 @@ pub struct IterMut<'a, T:'a> {
14141414
tail: uint,
14151415
head: uint,
14161416
cap: uint,
1417-
marker: marker::ContravariantLifetime<'a>,
1417+
marker: markers::ContravariantLifetime<'a>,
14181418
}
14191419

14201420
#[stable]

src/libcollections/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ use core::cmp::Ordering::{self, Greater, Less};
9595
use core::cmp::{self, Ord, PartialEq};
9696
use core::iter::{Iterator, IteratorExt};
9797
use core::iter::{range, range_step, MultiplicativeIterator};
98-
use core::kinds::Sized;
98+
use core::markers::Sized;
9999
use core::mem::size_of;
100100
use core::mem;
101101
use core::ops::{FnMut, SliceMut};

src/libcollections/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ use core::default::Default;
5555
use core::fmt;
5656
use core::hash::{self, Hash};
5757
use core::iter::{repeat, FromIterator};
58-
use core::kinds::marker::{ContravariantLifetime, InvariantType};
58+
use core::markers::{ContravariantLifetime, InvariantType};
5959
use core::mem;
6060
use core::nonzero::NonZero;
6161
use core::num::{Int, UnsignedInt};

src/libcore/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use clone::Clone;
1818
use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering};
1919
use fmt;
20-
use kinds::Copy;
20+
use markers::Copy;
2121
use ops::Deref;
2222
use option::Option;
2323

src/libcore/atomic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272

7373
use self::Ordering::*;
7474

75-
use kinds::Sync;
75+
use markers::Sync;
7676

7777
use intrinsics;
7878
use cell::UnsafeCell;

src/libcore/borrow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
use clone::Clone;
4848
use cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
4949
use fmt;
50-
use kinds::Sized;
50+
use markers::Sized;
5151
use ops::Deref;
5252
use option::Option;
5353
use self::Cow::*;

src/libcore/cell.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ use clone::Clone;
161161
use cmp::PartialEq;
162162
use default::Default;
163163
use fmt;
164-
use kinds::{Copy, Send};
164+
use markers::{Copy, Send};
165165
use ops::{Deref, DerefMut, Drop};
166166
use option::Option;
167167
use option::Option::{None, Some};
@@ -520,11 +520,11 @@ impl<'b, T> DerefMut for RefMut<'b, T> {
520520
///
521521
/// ```rust
522522
/// use std::cell::UnsafeCell;
523-
/// use std::kinds::marker;
523+
/// use std::markers;
524524
///
525525
/// struct NotThreadSafe<T> {
526526
/// value: UnsafeCell<T>,
527-
/// marker: marker::NoSync
527+
/// marker: markers::NoSync
528528
/// }
529529
/// ```
530530
///

src/libcore/clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
2222
#![stable]
2323

24-
use kinds::Sized;
24+
use markers::Sized;
2525

2626
/// A common trait for cloning an object.
2727
#[stable]

src/libcore/cmp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
use self::Ordering::*;
4545

46-
use kinds::Sized;
46+
use markers::Sized;
4747
use option::Option::{self, Some, None};
4848

4949
/// 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> {
316316
mod impls {
317317
use cmp::{PartialOrd, Ord, PartialEq, Eq, Ordering};
318318
use cmp::Ordering::{Less, Greater, Equal};
319-
use kinds::Sized;
319+
use markers::Sized;
320320
use option::Option;
321321
use option::Option::{Some, None};
322322

src/libcore/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use any;
1616
use cell::{Cell, Ref, RefMut};
1717
use iter::{Iterator, IteratorExt, range};
18-
use kinds::{Copy, Sized};
18+
use markers::{Copy, Sized};
1919
use mem;
2020
use option::Option;
2121
use option::Option::{Some, None};

src/libcore/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ use num::{ToPrimitive, Int};
6767
use ops::{Add, Deref, FnMut};
6868
use option::Option;
6969
use option::Option::{Some, None};
70-
use std::kinds::Sized;
70+
use std::markers::Sized;
7171
use uint;
7272

7373
/// An interface for dealing with "external iterators". These types of iterators

0 commit comments

Comments
 (0)