}
}
-#[experimental = "Deref is experimental."]
+#[stable]
impl<T> Deref for Arc<T> {
type Target = T;
}
#[unsafe_destructor]
-#[experimental = "waiting on stability of Drop"]
+#[stable]
impl<T: Sync + Send> Drop for Arc<T> {
/// Drops the `Arc<T>`.
///
}
#[unsafe_destructor]
-#[experimental = "Weak pointers may not belong in this module."]
+#[stable]
impl<T: Sync + Send> Drop for Weak<T> {
/// Drops the `Weak<T>`.
///
}
}
+#[stable]
impl<Sized? T> Deref for Box<T> {
type Target = T;
fn deref(&self) -> &T { &**self }
}
+#[stable]
impl<Sized? T> DerefMut for Box<T> {
fn deref_mut(&mut self) -> &mut T { &mut **self }
}
}
}
-#[experimental = "Deref is experimental."]
+#[stable]
impl<T> Deref for Rc<T> {
type Target = T;
}
#[unsafe_destructor]
-#[experimental = "Drop is experimental."]
+#[stable]
impl<T> Drop for Rc<T> {
/// Drops the `Rc<T>`.
///
}
#[unsafe_destructor]
-#[experimental = "Weak pointers may not belong in this module."]
+#[stable]
impl<T> Drop for Weak<T> {
/// Drops the `Weak<T>`.
///
}
/// `BinaryHeap` iterator.
+#[stable]
pub struct Iter <'a, T: 'a> {
iter: slice::Iter<'a, T>,
}
// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
+#[stable]
impl<'a, T> Clone for Iter<'a, T> {
fn clone(&self) -> Iter<'a, T> {
Iter { iter: self.iter.clone() }
impl<'a, T> ExactSizeIterator for Iter<'a, T> {}
/// An iterator that moves out of a `BinaryHeap`.
+#[stable]
pub struct IntoIter<T> {
iter: vec::IntoIter<T>,
}
impl<T> ExactSizeIterator for IntoIter<T> {}
/// An iterator that drains a `BinaryHeap`.
+#[unstable = "recent addition"]
pub struct Drain<'a, T: 'a> {
iter: vec::Drain<'a, T>,
}
pub use core::iter::range;
pub use core::iter::{FromIterator, Extend, IteratorExt};
pub use core::iter::{Iterator, DoubleEndedIterator, RandomAccessIterator};
- pub use core::iter::{IteratorCloneExt, CloneIteratorExt};
- pub use core::iter::{IteratorOrdExt, MutableDoubleEndedIterator, ExactSizeIterator};
+ pub use core::iter::{ExactSizeIterator};
pub use core::kinds::{Copy, Send, Sized, Sync};
pub use core::mem::drop;
pub use core::ops::{Drop, Fn, FnMut, FnOnce};
dir: Direction,
}
+#[stable]
impl Iterator for ElementSwaps {
type Item = (uint, uint);
/// External iterator for a string's decomposition's characters.
/// Use with the `std::iter` module.
#[derive(Clone)]
+#[unstable]
pub struct Decompositions<'a> {
kind: DecompositionType,
iter: Chars<'a>,
sorted: bool
}
+#[stable]
impl<'a> Iterator for Decompositions<'a> {
type Item = char;
/// External iterator for a string's recomposition's characters.
/// Use with the `std::iter` module.
#[derive(Clone)]
+#[unstable]
pub struct Recompositions<'a> {
iter: Decompositions<'a>,
state: RecompositionState,
last_ccc: Option<u8>
}
+#[stable]
impl<'a> Iterator for Recompositions<'a> {
type Item = char;
/// External iterator for a string's UTF16 codeunits.
/// Use with the `std::iter` module.
#[derive(Clone)]
+#[unstable]
pub struct Utf16Units<'a> {
encoder: Utf16Encoder<Chars<'a>>
}
+#[stable]
impl<'a> Iterator for Utf16Units<'a> {
type Item = u16;
}
}
-#[experimental = "waiting on FromIterator stabilization"]
+#[stable]
impl FromIterator<char> for String {
fn from_iter<I:Iterator<Item=char>>(iterator: I) -> String {
let mut buf = String::new();
}
}
-#[experimental = "waiting on FromIterator stabilization"]
+#[stable]
impl<'a> FromIterator<&'a str> for String {
fn from_iter<I:Iterator<Item=&'a str>>(iterator: I) -> String {
let mut buf = String::new();
}
}
-#[experimental = "waiting on Add stabilization"]
+#[unstable = "recent addition, needs more experience"]
impl<'a> Add<&'a str> for String {
type Output = String;
}
}
-#[experimental = "waiting on Deref stabilization"]
+#[stable]
impl ops::Deref for String {
type Target = str;
}
}
-#[experimental = "waiting on Deref stability"]
+#[stable]
impl<T> ops::Deref for Vec<T> {
type Target = [T];
fn deref<'a>(&'a self) -> &'a [T] { self.as_slice() }
}
-#[experimental = "waiting on DerefMut stability"]
+#[stable]
impl<T> ops::DerefMut for Vec<T> {
fn deref_mut<'a>(&'a mut self) -> &'a mut [T] { self.as_mut_slice() }
}
-#[experimental = "waiting on FromIterator stability"]
+#[stable]
impl<T> FromIterator<T> for Vec<T> {
#[inline]
fn from_iter<I:Iterator<Item=T>>(mut iterator: I) -> Vec<T> {
}
}
+#[unstable = "recent addition, needs more experience"]
impl<'a, T: Clone> Add<&'a [T]> for Vec<T> {
type Output = Vec<T>;
}
#[unsafe_destructor]
+#[stable]
impl<T> Drop for Vec<T> {
fn drop(&mut self) {
// This is (and should always remain) a no-op if the fields are
/// A clone-on-write vector
pub type CowVec<'a, T> = Cow<'a, Vec<T>, [T]>;
+#[unstable]
impl<'a, T> FromIterator<T> for CowVec<'a, T> where T: Clone {
fn from_iter<I: Iterator<Item=T>>(it: I) -> CowVec<'a, T> {
Cow::Owned(FromIterator::from_iter(it))
}
}
+#[stable]
impl<T> Iterator for IntoIter<T> {
type Item = T;
}
}
+#[stable]
impl<T> DoubleEndedIterator for IntoIter<T> {
#[inline]
fn next_back<'a>(&'a mut self) -> Option<T> {
}
}
+#[stable]
impl<T> ExactSizeIterator for IntoIter<T> {}
#[unsafe_destructor]
+#[stable]
impl<T> Drop for IntoIter<T> {
fn drop(&mut self) {
// destroy the remaining elements
marker: ContravariantLifetime<'a>,
}
+#[stable]
impl<'a, T> Iterator for Drain<'a, T> {
type Item = T;
}
}
+#[stable]
impl<'a, T> DoubleEndedIterator for Drain<'a, T> {
#[inline]
fn next_back(&mut self) -> Option<T> {
}
}
+#[stable]
impl<'a, T> ExactSizeIterator for Drain<'a, T> {}
#[unsafe_destructor]
+#[stable]
impl<'a, T> Drop for Drain<'a, T> {
fn drop(&mut self) {
// self.ptr == self.end == null if drop has already been called,
// Prevent the inner `Vec<T>` from attempting to deallocate memory.
#[unsafe_destructor]
-#[experimental]
+#[stable]
impl<'a, T> Drop for DerefVec<'a, T> {
fn drop(&mut self) {
self.x.len = 0;
}
}
+#[stable]
impl<'a, T, Sized? B> Deref for Cow<'a, T, B> where B: ToOwned<T> {
type Target = B;
_borrow: BorrowRef<'b>,
}
-#[unstable = "waiting for `Deref` to become stable"]
+#[stable]
impl<'b, T> Deref for Ref<'b, T> {
type Target = T;
_borrow: BorrowRefMut<'b>,
}
-#[unstable = "waiting for `Deref` to become stable"]
+#[stable]
impl<'b, T> Deref for RefMut<'b, T> {
type Target = T;
}
}
-#[unstable = "waiting for `DerefMut` to become stable"]
+#[stable]
impl<'b, T> DerefMut for RefMut<'b, T> {
#[inline]
fn deref_mut<'a>(&'a mut self) -> &'a mut T {
}
#[derive(Clone)]
+#[unstable]
enum EscapeUnicodeState {
Backslash,
Type,
}
#[derive(Clone)]
+#[unstable]
enum EscapeDefaultState {
Backslash(char),
Char(char),
}
}
-#[experimental]
+#[stable]
impl<A, St, F> Iterator for Unfold<A, St, F> where F: FnMut(&mut St) -> Option<A> {
type Item = A;
// FIXME(#19391) needs a snapshot
//impl<Idx: Clone + Step<T=uint>> Iterator<Idx> for Range<Idx> {
+#[unstable = "API still in development"]
impl<Idx: Clone + Step> Iterator for Range<Idx> {
type Item = Idx;
}
}
+#[unstable = "API still in development"]
impl<Idx: Clone + Step> DoubleEndedIterator for Range<Idx> {
#[inline]
fn next_back(&mut self) -> Option<Idx> {
}
}
+#[unstable = "API still in development"]
impl<Idx: Clone + Step> ExactSizeIterator for Range<Idx> {}
/// A range which is only bounded below.
pub start: Idx,
}
+#[unstable = "API still in development"]
impl<Idx: Clone + Step> Iterator for RangeFrom<Idx> {
type Item = Idx;
#[stable]
pub struct Iter<'a, A: 'a> { inner: Item<&'a A> }
+#[stable]
impl<'a, A> Iterator for Iter<'a, A> {
type Item = &'a A;
fn size_hint(&self) -> (uint, Option<uint>) { self.inner.size_hint() }
}
+#[stable]
impl<'a, A> DoubleEndedIterator for Iter<'a, A> {
#[inline]
fn next_back(&mut self) -> Option<&'a A> { self.inner.next_back() }
}
+#[stable]
impl<'a, A> ExactSizeIterator for Iter<'a, A> {}
#[stable]
#[stable]
pub struct IterMut<'a, A: 'a> { inner: Item<&'a mut A> }
+#[stable]
impl<'a, A> Iterator for IterMut<'a, A> {
type Item = &'a mut A;
fn size_hint(&self) -> (uint, Option<uint>) { self.inner.size_hint() }
}
+#[stable]
impl<'a, A> DoubleEndedIterator for IterMut<'a, A> {
#[inline]
fn next_back(&mut self) -> Option<&'a mut A> { self.inner.next_back() }
}
+#[stable]
impl<'a, A> ExactSizeIterator for IterMut<'a, A> {}
/// An iterator over the item contained inside an Option.
#[stable]
pub struct IntoIter<A> { inner: Item<A> }
+#[stable]
impl<A> Iterator for IntoIter<A> {
type Item = A;
fn size_hint(&self) -> (uint, Option<uint>) { self.inner.size_hint() }
}
+#[stable]
impl<A> DoubleEndedIterator for IntoIter<A> {
#[inline]
fn next_back(&mut self) -> Option<A> { self.inner.next_back() }
}
+#[stable]
impl<A> ExactSizeIterator for IntoIter<A> {}
/////////////////////////////////////////////////////////////////////////////
pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
pub use iter::{Extend, IteratorExt};
pub use iter::{Iterator, DoubleEndedIterator};
-pub use iter::{IteratorCloneExt, CloneIteratorExt};
-pub use iter::{IteratorOrdExt, ExactSizeIterator};
+pub use iter::{ExactSizeIterator};
pub use option::Option::{self, Some, None};
pub use ptr::{PtrExt, MutPtrExt};
pub use result::Result::{self, Ok, Err};
#[stable]
pub struct Iter<'a, T: 'a> { inner: Option<&'a T> }
+#[stable]
impl<'a, T> Iterator for Iter<'a, T> {
type Item = &'a T;
}
}
+#[stable]
impl<'a, T> DoubleEndedIterator for Iter<'a, T> {
#[inline]
fn next_back(&mut self) -> Option<&'a T> { self.inner.take() }
}
+#[stable]
impl<'a, T> ExactSizeIterator for Iter<'a, T> {}
impl<'a, T> Clone for Iter<'a, T> {
#[stable]
pub struct IterMut<'a, T: 'a> { inner: Option<&'a mut T> }
+#[stable]
impl<'a, T> Iterator for IterMut<'a, T> {
type Item = &'a mut T;
}
}
+#[stable]
impl<'a, T> DoubleEndedIterator for IterMut<'a, T> {
#[inline]
fn next_back(&mut self) -> Option<&'a mut T> { self.inner.take() }
}
+#[stable]
impl<'a, T> ExactSizeIterator for IterMut<'a, T> {}
/// An iterator over the value in a `Ok` variant of a `Result`.
#[stable]
pub struct IntoIter<T> { inner: Option<T> }
+#[stable]
impl<T> Iterator for IntoIter<T> {
type Item = T;
}
}
+#[stable]
impl<T> DoubleEndedIterator for IntoIter<T> {
#[inline]
fn next_back(&mut self) -> Option<T> { self.inner.take() }
}
+#[stable]
impl<T> ExactSizeIterator for IntoIter<T> {}
/////////////////////////////////////////////////////////////////////////////
// The shared definition of the `Iter` and `IterMut` iterators
macro_rules! iterator {
(struct $name:ident -> $ptr:ty, $elem:ty) => {
- #[experimental = "needs review"]
+ #[stable]
impl<'a, T> Iterator for $name<'a, T> {
type Item = $elem;
}
}
- #[experimental = "needs review"]
+ #[stable]
impl<'a, T> DoubleEndedIterator for $name<'a, T> {
#[inline]
fn next_back(&mut self) -> Option<$elem> {
iterator!{struct Iter -> *const T, &'a T}
-#[experimental = "needs review"]
+#[stable]
impl<'a, T> ExactSizeIterator for Iter<'a, T> {}
#[stable]
fn clone(&self) -> Iter<'a, T> { *self }
}
-#[experimental = "needs review"]
+#[experimental = "trait is experimental"]
impl<'a, T> RandomAccessIterator for Iter<'a, T> {
#[inline]
fn indexable(&self) -> uint {
iterator!{struct IterMut -> *mut T, &'a mut T}
-#[experimental = "needs review"]
+#[stable]
impl<'a, T> ExactSizeIterator for IterMut<'a, T> {}
/// An internal abstraction over the splitting iterators, so that
}
}
-#[experimental = "needs review"]
+#[stable]
impl<'a, T, P> Iterator for Split<'a, T, P> where P: FnMut(&T) -> bool {
type Item = &'a [T];
}
}
-#[experimental = "needs review"]
+#[stable]
impl<'a, T, P> DoubleEndedIterator for Split<'a, T, P> where P: FnMut(&T) -> bool {
#[inline]
fn next_back(&mut self) -> Option<&'a [T]> {
}
}
-#[experimental = "needs review"]
+#[stable]
impl<'a, T, P> Iterator for SplitMut<'a, T, P> where P: FnMut(&T) -> bool {
type Item = &'a mut [T];
}
}
-#[experimental = "needs review"]
+#[stable]
impl<'a, T, P> DoubleEndedIterator for SplitMut<'a, T, P> where
P: FnMut(&T) -> bool,
{
invert: bool
}
-#[experimental = "needs review"]
impl<T, I: SplitIter + Iterator<Item=T>> Iterator for GenericSplitN<I> {
type Item = T;
macro_rules! forward_iterator {
($name:ident: $elem:ident, $iter_of:ty) => {
+ #[stable]
impl<'a, $elem, P> Iterator for $name<'a, $elem, P> where
P: FnMut(&T) -> bool
{
size: uint
}
+#[stable]
impl<'a, T> Iterator for Windows<'a, T> {
type Item = &'a [T];
size: uint
}
-#[experimental = "needs review"]
+#[stable]
impl<'a, T> Iterator for Chunks<'a, T> {
type Item = &'a [T];
}
}
-#[experimental = "needs review"]
+#[stable]
impl<'a, T> DoubleEndedIterator for Chunks<'a, T> {
#[inline]
fn next_back(&mut self) -> Option<&'a [T]> {
}
}
-#[experimental = "needs review"]
+#[experimental = "trait is experimental"]
impl<'a, T> RandomAccessIterator for Chunks<'a, T> {
#[inline]
fn indexable(&self) -> uint {
chunk_size: uint
}
-#[experimental = "needs review"]
+#[stable]
impl<'a, T> Iterator for ChunksMut<'a, T> {
type Item = &'a mut [T];
}
}
-#[experimental = "needs review"]
+#[stable]
impl<'a, T> DoubleEndedIterator for ChunksMut<'a, T> {
#[inline]
fn next_back(&mut self) -> Option<&'a mut [T]> {
macro_rules! delegate_iter {
(exact $te:ty in $ti:ty) => {
delegate_iter!{$te in $ti}
+ #[stable]
impl<'a> ExactSizeIterator for $ti {
- #[inline]
- fn rposition<P>(&mut self, predicate: P) -> Option<uint> where P: FnMut($te) -> bool{
- self.0.rposition(predicate)
- }
#[inline]
fn len(&self) -> uint {
self.0.len()
}
};
($te:ty in $ti:ty) => {
+ #[stable]
impl<'a> Iterator for $ti {
type Item = $te;
self.0.size_hint()
}
}
+ #[stable]
impl<'a> DoubleEndedIterator for $ti {
#[inline]
fn next_back(&mut self) -> Option<$te> {
}
};
(pattern $te:ty in $ti:ty) => {
+ #[stable]
impl<'a, P: CharEq> Iterator for $ti {
type Item = $te;
self.0.size_hint()
}
}
+ #[stable]
impl<'a, P: CharEq> DoubleEndedIterator for $ti {
#[inline]
fn next_back(&mut self) -> Option<$te> {
}
};
(pattern forward $te:ty in $ti:ty) => {
+ #[stable]
impl<'a, P: CharEq> Iterator for $ti {
type Item = $te;
}
}
+#[stable]
impl<'a> Iterator for Chars<'a> {
type Item = char;
}
}
+#[stable]
impl<'a> DoubleEndedIterator for Chars<'a> {
#[inline]
fn next_back(&mut self) -> Option<char> {
/// External iterator for a string's characters and their byte offsets.
/// Use with the `std::iter` module.
#[derive(Clone)]
+#[stable]
pub struct CharIndices<'a> {
front_offset: uint,
iter: Chars<'a>,
}
+#[stable]
impl<'a> Iterator for CharIndices<'a> {
type Item = (uint, char);
}
}
+#[stable]
impl<'a> DoubleEndedIterator for CharIndices<'a> {
#[inline]
fn next_back(&mut self) -> Option<(uint, char)> {
}
}
+#[stable]
impl<'a, Sep: CharEq> Iterator for CharSplits<'a, Sep> {
type Item = &'a str;
}
}
+#[stable]
impl<'a, Sep: CharEq> DoubleEndedIterator for CharSplits<'a, Sep> {
#[inline]
fn next_back(&mut self) -> Option<&'a str> {
}
}
+#[stable]
impl<'a, Sep: CharEq> Iterator for CharSplitsN<'a, Sep> {
type Item = &'a str;
finished: bool
}
+#[stable]
impl<'a> Iterator for MatchIndices<'a> {
type Item = (uint, uint);
}
}
+#[stable]
impl<'a> Iterator for SplitStr<'a> {
type Item = &'a str;
fn default() -> &'a str { "" }
}
+#[stable]
impl<'a> Iterator for Lines<'a> {
type Item = &'a str;
fn next(&mut self) -> Option<&'a str> { self.inner.next() }
#[inline]
fn size_hint(&self) -> (uint, Option<uint>) { self.inner.size_hint() }
-}
+
+#[stable]}
impl<'a> DoubleEndedIterator for Lines<'a> {
#[inline]
fn next_back(&mut self) -> Option<&'a str> { self.inner.next_back() }
-}
+
+#[stable]}
impl<'a> Iterator for LinesAny<'a> {
type Item = &'a str;
fn next(&mut self) -> Option<&'a str> { self.inner.next() }
#[inline]
fn size_hint(&self) -> (uint, Option<uint>) { self.inner.size_hint() }
-}
+
+#[stable]}
impl<'a> DoubleEndedIterator for LinesAny<'a> {
#[inline]
fn next_back(&mut self) -> Option<&'a str> { self.inner.next_back() }
use fmt::Show;
use fmt;
use hash::{Hash, Hasher, RandomSipHasher};
-use iter::{Iterator, IteratorExt, IteratorCloneExt, FromIterator, Map, Chain, Extend};
+use iter::{Iterator, IteratorExt, FromIterator, Map, Chain, Extend};
use ops::{BitOr, BitAnd, BitXor, Sub};
use option::Option::{Some, None, self};
use result::Result::{Ok, Err};
use cmp;
use io::{Reader, Writer, Stream, Buffer, DEFAULT_BUF_SIZE, IoResult};
-use iter::ExactSizeIterator;
+use iter::{IteratorExt, ExactSizeIterator};
use ops::Drop;
use option::Option;
use option::Option::{Some, None};
#[stable] #[doc(no_inline)] pub use char::CharExt;
#[stable] #[doc(no_inline)] pub use clone::Clone;
#[stable] #[doc(no_inline)] pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
-#[stable] #[doc(no_inline)] pub use iter::CloneIteratorExt;
#[stable] #[doc(no_inline)] pub use iter::DoubleEndedIterator;
#[stable] #[doc(no_inline)] pub use iter::ExactSizeIterator;
#[stable] #[doc(no_inline)] pub use iter::{Iterator, IteratorExt, Extend};
-#[stable] #[doc(no_inline)] pub use iter::{IteratorCloneExt, IteratorOrdExt};
#[stable] #[doc(no_inline)] pub use option::Option::{self, Some, None};
#[stable] #[doc(no_inline)] pub use ptr::{PtrExt, MutPtrExt};
#[stable] #[doc(no_inline)] pub use result::Result::{self, Ok, Err};
pub fn notify_all(&self) { unsafe { self.inner.inner.notify_all() } }
}
+#[stable]
impl Drop for Condvar {
fn drop(&mut self) {
unsafe { self.inner.inner.destroy() }
}
#[unsafe_destructor]
+#[stable]
impl<T: Send> Drop for Sender<T> {
fn drop(&mut self) {
match *unsafe { self.inner_mut() } {
}
#[unsafe_destructor]
+#[stable]
impl<T: Send> Drop for SyncSender<T> {
fn drop(&mut self) {
unsafe { (*self.inner.get()).drop_chan(); }
}
}
-#[unstable]
+#[stable]
impl<'a, T: Send> Iterator for Iter<'a, T> {
type Item = T;
}
#[unsafe_destructor]
+#[stable]
impl<T: Send> Drop for Receiver<T> {
fn drop(&mut self) {
match *unsafe { self.inner_mut() } {
}
#[unsafe_destructor]
+#[stable]
impl<T: Send> Drop for Queue<T> {
fn drop(&mut self) {
unsafe {
}
#[unsafe_destructor]
+#[stable]
impl<T: Send> Drop for Mutex<T> {
fn drop(&mut self) {
// This is actually safe b/c we know that there is no further usage of
}
}
+#[stable]
impl<'mutex, T> Deref for MutexGuard<'mutex, T> {
type Target = T;
unsafe { &*self.__data.get() }
}
}
+#[stable]
impl<'mutex, T> DerefMut for MutexGuard<'mutex, T> {
fn deref_mut<'a>(&'a mut self) -> &'a mut T {
unsafe { &mut *self.__data.get() }
}
#[unsafe_destructor]
+#[stable]
impl<'a, T> Drop for MutexGuard<'a, T> {
#[inline]
fn drop(&mut self) {
}
#[unsafe_destructor]
+#[stable]
impl<T> Drop for RWLock<T> {
fn drop(&mut self) {
unsafe { self.inner.lock.destroy() }
}
}
+#[stable]
impl<'rwlock, T> Deref for RWLockReadGuard<'rwlock, T> {
type Target = T;
fn deref(&self) -> &T { unsafe { &*self.__data.get() } }
}
+#[stable]
impl<'rwlock, T> Deref for RWLockWriteGuard<'rwlock, T> {
type Target = T;
fn deref(&self) -> &T { unsafe { &*self.__data.get() } }
}
+#[stable]
impl<'rwlock, T> DerefMut for RWLockWriteGuard<'rwlock, T> {
fn deref_mut(&mut self) -> &mut T {
unsafe { &mut *self.__data.get() }
}
#[unsafe_destructor]
+#[stable]
impl<'a, T> Drop for RWLockReadGuard<'a, T> {
fn drop(&mut self) {
unsafe { self.__lock.lock.read_unlock(); }
}
#[unsafe_destructor]
+#[stable]
impl<'a, T> Drop for RWLockWriteGuard<'a, T> {
fn drop(&mut self) {
self.__lock.poison.done(&self.__poison);
}
#[unsafe_destructor]
+#[stable]
impl<'a> Drop for SemaphoreGuard<'a> {
fn drop(&mut self) {
self.sem.release();
}
#[unsafe_destructor]
+#[stable]
impl<T: Send> Drop for JoinGuard<T> {
fn drop(&mut self) {
if !self.joined {