Skip to content

Commit cd631c6

Browse files
committed
Register snapshot for 9006c3c
1 parent 3bf41da commit cd631c6

File tree

11 files changed

+9
-340
lines changed

11 files changed

+9
-340
lines changed

src/liballoc/rc.rs

Lines changed: 0 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -174,61 +174,17 @@ struct RcBox<T> {
174174
/// See the [module level documentation](../index.html) for more details.
175175
#[unsafe_no_drop_flag]
176176
#[stable]
177-
#[cfg(stage0)] // NOTE remove impl after next snapshot
178177
pub struct Rc<T> {
179178
// FIXME #12808: strange names to try to avoid interfering with field accesses of the contained
180179
// type via Deref
181180
_ptr: NonZero<*mut RcBox<T>>,
182-
_nosend: marker::NoSend,
183-
_noshare: marker::NoSync
184181
}
185182

186-
/// An immutable reference-counted pointer type.
187-
///
188-
/// See the [module level documentation](../index.html) for more details.
189-
#[unsafe_no_drop_flag]
190-
#[stable]
191-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
192-
pub struct Rc<T> {
193-
// FIXME #12808: strange names to try to avoid interfering with field accesses of the contained
194-
// type via Deref
195-
_ptr: NonZero<*mut RcBox<T>>,
196-
}
197-
198-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
199183
impl<T> !marker::Send for Rc<T> {}
200184

201-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
202185
impl<T> !marker::Sync for Rc<T> {}
203186

204187
impl<T> Rc<T> {
205-
/// Constructs a new `Rc<T>`.
206-
///
207-
/// # Examples
208-
///
209-
/// ```
210-
/// use std::rc::Rc;
211-
///
212-
/// let five = Rc::new(5i);
213-
/// ```
214-
#[stable]
215-
#[cfg(stage0)] // NOTE remove after next snapshot
216-
pub fn new(value: T) -> Rc<T> {
217-
unsafe {
218-
Rc {
219-
// there is an implicit weak pointer owned by all the strong pointers, which
220-
// ensures that the weak destructor never frees the allocation while the strong
221-
// destructor is running, even if the weak pointer is stored inside the strong one.
222-
_ptr: NonZero::new(transmute(box RcBox {
223-
value: value,
224-
strong: Cell::new(1),
225-
weak: Cell::new(1)
226-
})),
227-
_nosend: marker::NoSend,
228-
_noshare: marker::NoSync
229-
}
230-
}
231-
}
232188

233189
/// Constructs a new `Rc<T>`.
234190
///
@@ -240,7 +196,6 @@ impl<T> Rc<T> {
240196
/// let five = Rc::new(5i);
241197
/// ```
242198
#[stable]
243-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
244199
pub fn new(value: T) -> Rc<T> {
245200
unsafe {
246201
Rc {
@@ -267,29 +222,6 @@ impl<T> Rc<T> {
267222
///
268223
/// let weak_five = five.downgrade();
269224
/// ```
270-
#[cfg(stage0)] // NOTE remove after next snapshot
271-
#[unstable = "Weak pointers may not belong in this module"]
272-
pub fn downgrade(&self) -> Weak<T> {
273-
self.inc_weak();
274-
Weak {
275-
_ptr: self._ptr,
276-
_nosend: marker::NoSend,
277-
_noshare: marker::NoSync
278-
}
279-
}
280-
281-
/// Downgrades the `Rc<T>` to a `Weak<T>` reference.
282-
///
283-
/// # Examples
284-
///
285-
/// ```
286-
/// use std::rc::Rc;
287-
///
288-
/// let five = Rc::new(5i);
289-
///
290-
/// let weak_five = five.downgrade();
291-
/// ```
292-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
293225
#[unstable = "Weak pointers may not belong in this module"]
294226
pub fn downgrade(&self) -> Weak<T> {
295227
self.inc_weak();
@@ -483,25 +415,6 @@ impl<T> Drop for Rc<T> {
483415

484416
#[stable]
485417
impl<T> Clone for Rc<T> {
486-
/// Makes a clone of the `Rc<T>`.
487-
///
488-
/// This increases the strong reference count.
489-
///
490-
/// # Examples
491-
///
492-
/// ```
493-
/// use std::rc::Rc;
494-
///
495-
/// let five = Rc::new(5i);
496-
///
497-
/// five.clone();
498-
/// ```
499-
#[inline]
500-
#[cfg(stage0)] // NOTE remove after next snapshot
501-
fn clone(&self) -> Rc<T> {
502-
self.inc_strong();
503-
Rc { _ptr: self._ptr, _nosend: marker::NoSend, _noshare: marker::NoSync }
504-
}
505418

506419
/// Makes a clone of the `Rc<T>`.
507420
///
@@ -517,7 +430,6 @@ impl<T> Clone for Rc<T> {
517430
/// five.clone();
518431
/// ```
519432
#[inline]
520-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
521433
fn clone(&self) -> Rc<T> {
522434
self.inc_strong();
523435
Rc { _ptr: self._ptr }
@@ -714,66 +626,21 @@ impl<T: fmt::String> fmt::String for Rc<T> {
714626
/// See the [module level documentation](../index.html) for more.
715627
#[unsafe_no_drop_flag]
716628
#[unstable = "Weak pointers may not belong in this module."]
717-
#[cfg(stage0)] // NOTE remove impl after next snapshot
718629
pub struct Weak<T> {
719630
// FIXME #12808: strange names to try to avoid interfering with
720631
// field accesses of the contained type via Deref
721632
_ptr: NonZero<*mut RcBox<T>>,
722-
_nosend: marker::NoSend,
723-
_noshare: marker::NoSync
724633
}
725634

726-
/// A weak version of `Rc<T>`.
727-
///
728-
/// Weak references do not count when determining if the inner value should be dropped.
729-
///
730-
/// See the [module level documentation](../index.html) for more.
731-
#[unsafe_no_drop_flag]
732-
#[unstable = "Weak pointers may not belong in this module."]
733-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
734-
pub struct Weak<T> {
735-
// FIXME #12808: strange names to try to avoid interfering with
736-
// field accesses of the contained type via Deref
737-
_ptr: NonZero<*mut RcBox<T>>,
738-
}
739-
740-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
741635
#[allow(unstable)]
742636
impl<T> !marker::Send for Weak<T> {}
743637

744-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
745638
#[allow(unstable)]
746639
impl<T> !marker::Sync for Weak<T> {}
747640

748641

749642
#[unstable = "Weak pointers may not belong in this module."]
750643
impl<T> Weak<T> {
751-
/// Upgrades a weak reference to a strong reference.
752-
///
753-
/// Upgrades the `Weak<T>` reference to an `Rc<T>`, if possible.
754-
///
755-
/// Returns `None` if there were no strong references and the data was destroyed.
756-
///
757-
/// # Examples
758-
///
759-
/// ```
760-
/// use std::rc::Rc;
761-
///
762-
/// let five = Rc::new(5i);
763-
///
764-
/// let weak_five = five.downgrade();
765-
///
766-
/// let strong_five: Option<Rc<_>> = weak_five.upgrade();
767-
/// ```
768-
#[cfg(stage0)] // NOTE remove after next snapshot
769-
pub fn upgrade(&self) -> Option<Rc<T>> {
770-
if self.strong() == 0 {
771-
None
772-
} else {
773-
self.inc_strong();
774-
Some(Rc { _ptr: self._ptr, _nosend: marker::NoSend, _noshare: marker::NoSync })
775-
}
776-
}
777644

778645
/// Upgrades a weak reference to a strong reference.
779646
///
@@ -792,7 +659,6 @@ impl<T> Weak<T> {
792659
///
793660
/// let strong_five: Option<Rc<_>> = weak_five.upgrade();
794661
/// ```
795-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
796662
pub fn upgrade(&self) -> Option<Rc<T>> {
797663
if self.strong() == 0 {
798664
None
@@ -849,25 +715,6 @@ impl<T> Drop for Weak<T> {
849715

850716
#[unstable = "Weak pointers may not belong in this module."]
851717
impl<T> Clone for Weak<T> {
852-
/// Makes a clone of the `Weak<T>`.
853-
///
854-
/// This increases the weak reference count.
855-
///
856-
/// # Examples
857-
///
858-
/// ```
859-
/// use std::rc::Rc;
860-
///
861-
/// let weak_five = Rc::new(5i).downgrade();
862-
///
863-
/// weak_five.clone();
864-
/// ```
865-
#[inline]
866-
#[cfg(stage0)] // NOTE remove after next snapshot
867-
fn clone(&self) -> Weak<T> {
868-
self.inc_weak();
869-
Weak { _ptr: self._ptr, _nosend: marker::NoSend, _noshare: marker::NoSync }
870-
}
871718

872719
/// Makes a clone of the `Weak<T>`.
873720
///
@@ -883,7 +730,6 @@ impl<T> Clone for Weak<T> {
883730
/// weak_five.clone();
884731
/// ```
885732
#[inline]
886-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
887733
fn clone(&self) -> Weak<T> {
888734
self.inc_weak();
889735
Weak { _ptr: self._ptr }

src/libcollections/btree/set.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ use core::cmp::Ordering::{self, Less, Greater, Equal};
1818
use core::default::Default;
1919
use core::fmt::Show;
2020
use core::fmt;
21-
// NOTE(stage0) remove import after a snapshot
22-
#[cfg(stage0)]
23-
use core::hash::Hash;
2421
use core::iter::{Peekable, Map, FromIterator};
2522
use core::ops::{BitOr, BitAnd, BitXor, Sub};
2623

src/libcore/marker.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -376,16 +376,6 @@ pub struct ContravariantLifetime<'a>;
376376
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
377377
pub struct InvariantLifetime<'a>;
378378

379-
/// A type which is considered "not sendable", meaning that it cannot
380-
/// be safely sent between tasks, even if it is owned. This is
381-
/// typically embedded in other types, such as `Gc`, to ensure that
382-
/// their instances remain thread-local.
383-
#[unstable = "likely to change with new variance strategy"]
384-
#[lang="no_send_bound"]
385-
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
386-
#[cfg(stage0)] // NOTE remove impl after next snapshot
387-
pub struct NoSend;
388-
389379
/// A type which is considered "not POD", meaning that it is not
390380
/// implicitly copyable. This is typically embedded in other types to
391381
/// ensure that they are never copied, even if they lack a destructor.
@@ -395,15 +385,6 @@ pub struct NoSend;
395385
#[allow(missing_copy_implementations)]
396386
pub struct NoCopy;
397387

398-
/// A type which is considered "not sync", meaning that
399-
/// its contents are not threadsafe, hence they cannot be
400-
/// shared between tasks.
401-
#[unstable = "likely to change with new variance strategy"]
402-
#[lang="no_sync_bound"]
403-
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
404-
#[cfg(stage0)] // NOTE remove impl after next snapshot
405-
pub struct NoSync;
406-
407388
/// A type which is considered managed by the GC. This is typically
408389
/// embedded in other types.
409390
#[unstable = "likely to change with new variance strategy"]

src/librustc/middle/region.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ use util::nodemap::{FnvHashMap, FnvHashSet, NodeMap};
2222
use util::common::can_reach;
2323

2424
use std::cell::RefCell;
25-
// NOTE(stage0) remove import after a snapshot
26-
#[cfg(stage0)]
27-
use std::hash::{Hash};
2825
use syntax::codemap::Span;
2926
use syntax::{ast, visit};
3027
use syntax::ast::{Block, Item, FnDecl, NodeId, Arm, Pat, Stmt, Expr, Local};

src/libstd/io/process.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ use prelude::v1::*;
2121
use collections::HashMap;
2222
use ffi::CString;
2323
use fmt;
24-
// NOTE(stage0) remove import after a snapshot
25-
#[cfg(stage0)]
26-
use hash::Hash;
2724
use io::pipe::{PipeStream, PipePair};
2825
use io::{IoResult, IoError};
2926
use io;

src/libstd/sync/mpsc/blocking.rs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ use thread::Thread;
1414
use sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering};
1515
use sync::Arc;
1616
use marker::{Sync, Send};
17-
#[cfg(stage0)] // NOTE remove use after next snapshot
18-
use marker::{NoSend, NoSync};
1917
use mem;
2018
use clone::Clone;
2119

@@ -32,42 +30,14 @@ pub struct SignalToken {
3230
inner: Arc<Inner>,
3331
}
3432

35-
#[cfg(stage0)] // NOTE remove impl after next snapshot
3633
pub struct WaitToken {
3734
inner: Arc<Inner>,
38-
no_send: NoSend,
39-
no_sync: NoSync,
4035
}
4136

42-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
43-
pub struct WaitToken {
44-
inner: Arc<Inner>,
45-
}
46-
47-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
4837
impl !Send for WaitToken {}
4938

50-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
5139
impl !Sync for WaitToken {}
5240

53-
#[cfg(stage0)] // NOTE remove impl after next snapshot
54-
pub fn tokens() -> (WaitToken, SignalToken) {
55-
let inner = Arc::new(Inner {
56-
thread: Thread::current(),
57-
woken: ATOMIC_BOOL_INIT,
58-
});
59-
let wait_token = WaitToken {
60-
inner: inner.clone(),
61-
no_send: NoSend,
62-
no_sync: NoSync,
63-
};
64-
let signal_token = SignalToken {
65-
inner: inner
66-
};
67-
(wait_token, signal_token)
68-
}
69-
70-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
7141
pub fn tokens() -> (WaitToken, SignalToken) {
7242
let inner = Arc::new(Inner {
7343
thread: Thread::current(),

src/libstd/sync/mpsc/mod.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -370,22 +370,10 @@ unsafe impl<T:Send> Send for Sender<T> { }
370370
/// The sending-half of Rust's synchronous channel type. This half can only be
371371
/// owned by one task, but it can be cloned to send to other tasks.
372372
#[stable]
373-
#[cfg(stage0)] // NOTE remove impl after next snapshot
374373
pub struct SyncSender<T> {
375374
inner: Arc<RacyCell<sync::Packet<T>>>,
376-
// can't share in an arc
377-
_marker: marker::NoSync,
378375
}
379376

380-
/// The sending-half of Rust's synchronous channel type. This half can only be
381-
/// owned by one task, but it can be cloned to send to other tasks.
382-
#[stable]
383-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
384-
pub struct SyncSender<T> {
385-
inner: Arc<RacyCell<sync::Packet<T>>>,
386-
}
387-
388-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
389377
impl<T> !marker::Sync for SyncSender<T> {}
390378

391379
/// An error returned from the `send` function on channels.
@@ -689,12 +677,7 @@ impl<T: Send> Drop for Sender<T> {
689677
////////////////////////////////////////////////////////////////////////////////
690678

691679
impl<T: Send> SyncSender<T> {
692-
#[cfg(stage0)] // NOTE remove impl after next snapshot
693-
fn new(inner: Arc<RacyCell<sync::Packet<T>>>) -> SyncSender<T> {
694-
SyncSender { inner: inner, _marker: marker::NoSync }
695-
}
696680

697-
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
698681
fn new(inner: Arc<RacyCell<sync::Packet<T>>>) -> SyncSender<T> {
699682
SyncSender { inner: inner }
700683
}

0 commit comments

Comments
 (0)