/// used to break cycles between `Arc` pointers.
#[unsafe_no_drop_flag]
#[unstable(feature = "arc_weak",
- reason = "Weak pointers may not belong in this module.")]
+ reason = "Weak pointers may not belong in this module.",
+ issue = "27718")]
pub struct Weak<T: ?Sized> {
// FIXME #12808: strange name to try to avoid interfering with
// field accesses of the contained type via Deref
/// let weak_five = five.downgrade();
/// ```
#[unstable(feature = "arc_weak",
- reason = "Weak pointers may not belong in this module.")]
+ reason = "Weak pointers may not belong in this module.",
+ issue = "27718")]
pub fn downgrade(&self) -> Weak<T> {
loop {
// This Relaxed is OK because we're checking the value in the CAS
/// Get the number of weak references to this value.
#[inline]
- #[unstable(feature = "arc_counts")]
+ #[unstable(feature = "arc_counts", issue = "27718")]
pub fn weak_count(this: &Arc<T>) -> usize {
this.inner().weak.load(SeqCst) - 1
}
/// Get the number of strong references to this value.
#[inline]
- #[unstable(feature = "arc_counts")]
+ #[unstable(feature = "arc_counts", issue = "27718")]
pub fn strong_count(this: &Arc<T>) -> usize {
this.inner().strong.load(SeqCst)
}
/// let mut_five = Arc::make_unique(&mut five);
/// ```
#[inline]
- #[unstable(feature = "arc_unique")]
+ #[unstable(feature = "arc_unique", issue = "27718")]
pub fn make_unique(this: &mut Arc<T>) -> &mut T {
// Note that we hold both a strong reference and a weak reference.
// Thus, releasing our strong reference only will not, by itself, cause
/// # }
/// ```
#[inline]
- #[unstable(feature = "arc_unique")]
+ #[unstable(feature = "arc_unique", issue = "27718")]
pub fn get_mut(this: &mut Arc<T>) -> Option<&mut T> {
if this.is_unique() {
// This unsafety is ok because we're guaranteed that the pointer
}
#[unstable(feature = "arc_weak",
- reason = "Weak pointers may not belong in this module.")]
+ reason = "Weak pointers may not belong in this module.",
+ issue = "27718")]
impl<T: ?Sized> Weak<T> {
/// Upgrades a weak reference to a strong reference.
///
}
#[unstable(feature = "arc_weak",
- reason = "Weak pointers may not belong in this module.")]
+ reason = "Weak pointers may not belong in this module.",
+ issue = "27718")]
impl<T: ?Sized> Clone for Weak<T> {
/// Makes a clone of the `Weak<T>`.
///
/// ```
#[lang = "exchange_heap"]
#[unstable(feature = "box_heap",
- reason = "may be renamed; uncertain about custom allocator design")]
+ reason = "may be renamed; uncertain about custom allocator design",
+ issue = "27779")]
pub const HEAP: ExchangeHeapSingleton =
ExchangeHeapSingleton { _force_singleton: () };
/// This the singleton type used solely for `boxed::HEAP`.
#[unstable(feature = "box_heap",
- reason = "may be renamed; uncertain about custom allocator design")]
+ reason = "may be renamed; uncertain about custom allocator design",
+ issue = "27779")]
#[derive(Copy, Clone)]
pub struct ExchangeHeapSingleton { _force_singleton: () }
/// the fact that the `align_of` intrinsic currently requires the
/// input type to be Sized (which I do not think is strictly
/// necessary).
-#[unstable(feature = "placement_in", reason = "placement box design is still being worked out.")]
+#[unstable(feature = "placement_in",
+ reason = "placement box design is still being worked out.",
+ issue = "27779")]
pub struct IntermediateBox<T: ?Sized>{
ptr: *mut u8,
size: usize,
/// lead to memory problems like double-free, for example if the
/// function is called twice on the same raw pointer.
#[unstable(feature = "box_raw",
- reason = "may be renamed or moved out of Box scope")]
+ reason = "may be renamed or moved out of Box scope",
+ issue = "27768")]
#[inline]
// NB: may want to be called from_ptr, see comments on CStr::from_ptr
pub unsafe fn from_raw(raw: *mut T) -> Self {
/// let raw = Box::into_raw(seventeen);
/// let boxed_again = unsafe { Box::from_raw(raw) };
/// ```
- #[unstable(feature = "box_raw", reason = "may be renamed")]
+ #[unstable(feature = "box_raw", reason = "may be renamed",
+ issue = "27768")]
#[inline]
// NB: may want to be called into_ptr, see comments on CStr::from_ptr
pub fn into_raw(b: Box<T>) -> *mut T {
/// }
/// ```
#[rustc_paren_sugar]
-#[unstable(feature = "fnbox", reason = "Newly introduced")]
+#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "0")]
pub trait FnBox<A> {
type Output;
reason = "the precise API and guarantees it provides may be tweaked \
slightly, especially to possibly take into account the \
types being stored to make room for a future \
- tracing garbage collector")]
+ tracing garbage collector",
+ issue = "27700")]
use core::{isize, usize};
#![allow(unused_attributes)]
#![unstable(feature = "alloc",
reason = "this library is unlikely to be stabilized in its current \
- form or name")]
+ form or name",
+ issue = "27783")]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/",
/// Common out-of-memory routine
#[cold]
#[inline(never)]
-#[unstable(feature = "oom", reason = "not a scrutinized interface")]
+#[unstable(feature = "oom", reason = "not a scrutinized interface",
+ issue = "27700")]
pub fn oom() -> ! {
// FIXME(#14674): This really needs to do something other than just abort
// here, but any printing done must be *guaranteed* to not
/// assert_eq!(Rc::try_unwrap(x), Err(Rc::new(4)));
/// ```
#[inline]
- #[unstable(feature = "rc_unique")]
+ #[unstable(feature = "rc_unique", issue = "27718")]
pub fn try_unwrap(rc: Rc<T>) -> Result<T, Rc<T>> {
if Rc::is_unique(&rc) {
unsafe {
/// let weak_five = five.downgrade();
/// ```
#[unstable(feature = "rc_weak",
- reason = "Weak pointers may not belong in this module")]
+ reason = "Weak pointers may not belong in this module",
+ issue = "27718")]
pub fn downgrade(&self) -> Weak<T> {
self.inc_weak();
Weak { _ptr: self._ptr }
/// Get the number of weak references to this value.
#[inline]
- #[unstable(feature = "rc_counts")]
+ #[unstable(feature = "rc_counts", issue = "27718")]
pub fn weak_count(this: &Rc<T>) -> usize { this.weak() - 1 }
/// Get the number of strong references to this value.
#[inline]
- #[unstable(feature = "rc_counts")]
+ #[unstable(feature = "rc_counts", issue= "27718")]
pub fn strong_count(this: &Rc<T>) -> usize { this.strong() }
/// Returns true if there are no other `Rc` or `Weak<T>` values that share
/// assert!(Rc::is_unique(&five));
/// ```
#[inline]
- #[unstable(feature = "rc_unique")]
+ #[unstable(feature = "rc_unique", issue = "27718")]
pub fn is_unique(rc: &Rc<T>) -> bool {
Rc::weak_count(rc) == 0 && Rc::strong_count(rc) == 1
}
/// assert!(Rc::get_mut(&mut x).is_none());
/// ```
#[inline]
- #[unstable(feature = "rc_unique")]
+ #[unstable(feature = "rc_unique", issue = "27718")]
pub fn get_mut(rc: &mut Rc<T>) -> Option<&mut T> {
if Rc::is_unique(rc) {
let inner = unsafe { &mut **rc._ptr };
/// let mut_five = five.make_unique();
/// ```
#[inline]
- #[unstable(feature = "rc_unique")]
+ #[unstable(feature = "rc_unique", issue = "27718")]
pub fn make_unique(&mut self) -> &mut T {
if !Rc::is_unique(self) {
*self = Rc::new((**self).clone())
/// See the [module level documentation](./index.html) for more.
#[unsafe_no_drop_flag]
#[unstable(feature = "rc_weak",
- reason = "Weak pointers may not belong in this module.")]
+ reason = "Weak pointers may not belong in this module.",
+ issue = "27718")]
pub struct Weak<T: ?Sized> {
// FIXME #12808: strange names to try to avoid interfering with
// field accesses of the contained type via Deref
impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
#[unstable(feature = "rc_weak",
- reason = "Weak pointers may not belong in this module.")]
+ reason = "Weak pointers may not belong in this module.",
+ issue = "27718")]
impl<T: ?Sized> Weak<T> {
/// Upgrades a weak reference to a strong reference.
}
#[unstable(feature = "rc_weak",
- reason = "Weak pointers may not belong in this module.")]
+ reason = "Weak pointers may not belong in this module.",
+ issue = "27718")]
impl<T: ?Sized> Clone for Weak<T> {
/// Makes a clone of the `Weak<T>`.