core: Fill out issues for unstable features
This commit is contained in:
parent
6634777ae0
commit
b7dcf272d9
29 changed files with 174 additions and 101 deletions
|
|
@ -91,7 +91,8 @@ use marker::{Reflect, Sized};
|
|||
pub trait Any: Reflect + 'static {
|
||||
/// Gets the `TypeId` of `self`.
|
||||
#[unstable(feature = "get_type_id",
|
||||
reason = "this method will likely be replaced by an associated static")]
|
||||
reason = "this method will likely be replaced by an associated static",
|
||||
issue = "27745")]
|
||||
fn get_type_id(&self) -> TypeId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@
|
|||
|
||||
#![unstable(feature = "fixed_size_array",
|
||||
reason = "traits and impls are better expressed through generic \
|
||||
integer constants")]
|
||||
integer constants",
|
||||
issue = "27778")]
|
||||
|
||||
use clone::Clone;
|
||||
use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering};
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ impl<T:Copy> Cell<T> {
|
|||
/// let uc = unsafe { c.as_unsafe_cell() };
|
||||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "as_unsafe_cell")]
|
||||
#[unstable(feature = "as_unsafe_cell", issue = "27708")]
|
||||
pub unsafe fn as_unsafe_cell<'a>(&'a self) -> &'a UnsafeCell<T> {
|
||||
&self.value
|
||||
}
|
||||
|
|
@ -278,7 +278,7 @@ pub struct RefCell<T: ?Sized> {
|
|||
|
||||
/// An enumeration of values returned from the `state` method on a `RefCell<T>`.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
#[unstable(feature = "borrow_state")]
|
||||
#[unstable(feature = "borrow_state", issue = "27733")]
|
||||
pub enum BorrowState {
|
||||
/// The cell is currently being read, there is at least one active `borrow`.
|
||||
Reading,
|
||||
|
|
@ -340,7 +340,7 @@ impl<T: ?Sized> RefCell<T> {
|
|||
///
|
||||
/// The returned value can be dispatched on to determine if a call to
|
||||
/// `borrow` or `borrow_mut` would succeed.
|
||||
#[unstable(feature = "borrow_state")]
|
||||
#[unstable(feature = "borrow_state", issue = "27733")]
|
||||
#[inline]
|
||||
pub fn borrow_state(&self) -> BorrowState {
|
||||
match self.borrow.get() {
|
||||
|
|
@ -449,7 +449,7 @@ impl<T: ?Sized> RefCell<T> {
|
|||
///
|
||||
/// This function is `unsafe` because `UnsafeCell`'s field is public.
|
||||
#[inline]
|
||||
#[unstable(feature = "as_unsafe_cell")]
|
||||
#[unstable(feature = "as_unsafe_cell", issue = "27708")]
|
||||
pub unsafe fn as_unsafe_cell<'a>(&'a self) -> &'a UnsafeCell<T> {
|
||||
&self.value
|
||||
}
|
||||
|
|
@ -556,7 +556,8 @@ impl<'b, T: ?Sized> Ref<'b, T> {
|
|||
/// with the widespread use of `r.borrow().clone()` to clone the contents of
|
||||
/// a `RefCell`.
|
||||
#[unstable(feature = "cell_extras",
|
||||
reason = "likely to be moved to a method, pending language changes")]
|
||||
reason = "likely to be moved to a method, pending language changes",
|
||||
issue = "27746")]
|
||||
#[inline]
|
||||
pub fn clone(orig: &Ref<'b, T>) -> Ref<'b, T> {
|
||||
Ref {
|
||||
|
|
@ -585,7 +586,8 @@ impl<'b, T: ?Sized> Ref<'b, T> {
|
|||
/// let b2: Ref<u32> = Ref::map(b1, |t| &t.0);
|
||||
/// assert_eq!(*b2, 5)
|
||||
/// ```
|
||||
#[unstable(feature = "cell_extras", reason = "recently added")]
|
||||
#[unstable(feature = "cell_extras", reason = "recently added",
|
||||
issue = "27746")]
|
||||
#[inline]
|
||||
pub fn map<U: ?Sized, F>(orig: Ref<'b, T>, f: F) -> Ref<'b, U>
|
||||
where F: FnOnce(&T) -> &U
|
||||
|
|
@ -616,7 +618,8 @@ impl<'b, T: ?Sized> Ref<'b, T> {
|
|||
/// let b2: Ref<u32> = Ref::filter_map(b1, |o| o.as_ref().ok()).unwrap();
|
||||
/// assert_eq!(*b2, 5)
|
||||
/// ```
|
||||
#[unstable(feature = "cell_extras", reason = "recently added")]
|
||||
#[unstable(feature = "cell_extras", reason = "recently added",
|
||||
issue = "27746")]
|
||||
#[inline]
|
||||
pub fn filter_map<U: ?Sized, F>(orig: Ref<'b, T>, f: F) -> Option<Ref<'b, U>>
|
||||
where F: FnOnce(&T) -> Option<&U>
|
||||
|
|
@ -653,7 +656,8 @@ impl<'b, T: ?Sized> RefMut<'b, T> {
|
|||
/// }
|
||||
/// assert_eq!(*c.borrow(), (42, 'b'));
|
||||
/// ```
|
||||
#[unstable(feature = "cell_extras", reason = "recently added")]
|
||||
#[unstable(feature = "cell_extras", reason = "recently added",
|
||||
issue = "27746")]
|
||||
#[inline]
|
||||
pub fn map<U: ?Sized, F>(orig: RefMut<'b, T>, f: F) -> RefMut<'b, U>
|
||||
where F: FnOnce(&mut T) -> &mut U
|
||||
|
|
@ -690,7 +694,8 @@ impl<'b, T: ?Sized> RefMut<'b, T> {
|
|||
/// }
|
||||
/// assert_eq!(*c.borrow(), Ok(42));
|
||||
/// ```
|
||||
#[unstable(feature = "cell_extras", reason = "recently added")]
|
||||
#[unstable(feature = "cell_extras", reason = "recently added",
|
||||
issue = "27746")]
|
||||
#[inline]
|
||||
pub fn filter_map<U: ?Sized, F>(orig: RefMut<'b, T>, f: F) -> Option<RefMut<'b, U>>
|
||||
where F: FnOnce(&mut T) -> Option<&mut U>
|
||||
|
|
|
|||
|
|
@ -91,7 +91,8 @@ pub fn from_u32(i: u32) -> Option<char> {
|
|||
/// Converts a `u32` to an `char`, not checking whether it is a valid unicode
|
||||
/// codepoint.
|
||||
#[inline]
|
||||
#[unstable(feature = "char_from_unchecked", reason = "recently added API")]
|
||||
#[unstable(feature = "char_from_unchecked", reason = "recently added API",
|
||||
issue = "27781")]
|
||||
pub unsafe fn from_u32_unchecked(i: u32) -> char {
|
||||
transmute(i)
|
||||
}
|
||||
|
|
@ -139,7 +140,8 @@ pub fn from_digit(num: u32, radix: u32) -> Option<char> {
|
|||
#[allow(missing_docs)] // docs in libunicode/u_char.rs
|
||||
#[doc(hidden)]
|
||||
#[unstable(feature = "core_char_ext",
|
||||
reason = "the stable interface is `impl char` in later crate")]
|
||||
reason = "the stable interface is `impl char` in later crate",
|
||||
issue = "27701")]
|
||||
pub trait CharExt {
|
||||
fn is_digit(self, radix: u32) -> bool;
|
||||
fn to_digit(self, radix: u32) -> Option<u32>;
|
||||
|
|
@ -230,7 +232,8 @@ impl CharExt for char {
|
|||
/// and a `None` will be returned.
|
||||
#[inline]
|
||||
#[unstable(feature = "char_internals",
|
||||
reason = "this function should not be exposed publicly")]
|
||||
reason = "this function should not be exposed publicly",
|
||||
issue = "0")]
|
||||
#[doc(hidden)]
|
||||
pub fn encode_utf8_raw(code: u32, dst: &mut [u8]) -> Option<usize> {
|
||||
// Marked #[inline] to allow llvm optimizing it away
|
||||
|
|
@ -264,7 +267,8 @@ pub fn encode_utf8_raw(code: u32, dst: &mut [u8]) -> Option<usize> {
|
|||
/// and a `None` will be returned.
|
||||
#[inline]
|
||||
#[unstable(feature = "char_internals",
|
||||
reason = "this function should not be exposed publicly")]
|
||||
reason = "this function should not be exposed publicly",
|
||||
issue = "0")]
|
||||
#[doc(hidden)]
|
||||
pub fn encode_utf16_raw(mut ch: u32, dst: &mut [u16]) -> Option<usize> {
|
||||
// Marked #[inline] to allow llvm optimizing it away
|
||||
|
|
|
|||
|
|
@ -177,7 +177,8 @@ impl<'a, 'b: 'a> DebugTuple<'a, 'b> {
|
|||
}
|
||||
|
||||
/// Returns the wrapped `Formatter`.
|
||||
#[unstable(feature = "debug_builder_formatter", reason = "recently added")]
|
||||
#[unstable(feature = "debug_builder_formatter", reason = "recently added",
|
||||
issue = "27782")]
|
||||
pub fn formatter(&mut self) -> &mut fmt::Formatter<'b> {
|
||||
&mut self.fmt
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ pub use self::builders::{DebugStruct, DebugTuple, DebugSet, DebugList, DebugMap}
|
|||
mod num;
|
||||
mod builders;
|
||||
|
||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!")]
|
||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!",
|
||||
issue = "0")]
|
||||
#[doc(hidden)]
|
||||
pub mod rt {
|
||||
pub mod v1;
|
||||
|
|
@ -146,7 +147,8 @@ enum Void {}
|
|||
/// compile time it is ensured that the function and the value have the correct
|
||||
/// types, and then this struct is used to canonicalize arguments to one type.
|
||||
#[derive(Copy)]
|
||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!")]
|
||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!",
|
||||
issue = "0")]
|
||||
#[doc(hidden)]
|
||||
pub struct ArgumentV1<'a> {
|
||||
value: &'a Void,
|
||||
|
|
@ -166,7 +168,8 @@ impl<'a> ArgumentV1<'a> {
|
|||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!")]
|
||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!",
|
||||
issue = "0")]
|
||||
pub fn new<'b, T>(x: &'b T,
|
||||
f: fn(&T, &mut Formatter) -> Result) -> ArgumentV1<'b> {
|
||||
unsafe {
|
||||
|
|
@ -178,7 +181,8 @@ impl<'a> ArgumentV1<'a> {
|
|||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!")]
|
||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!",
|
||||
issue = "0")]
|
||||
pub fn from_usize(x: &usize) -> ArgumentV1 {
|
||||
ArgumentV1::new(x, ArgumentV1::show_usize)
|
||||
}
|
||||
|
|
@ -201,7 +205,8 @@ impl<'a> Arguments<'a> {
|
|||
/// When using the format_args!() macro, this function is used to generate the
|
||||
/// Arguments structure.
|
||||
#[doc(hidden)] #[inline]
|
||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!")]
|
||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!",
|
||||
issue = "0")]
|
||||
pub fn new_v1(pieces: &'a [&'a str],
|
||||
args: &'a [ArgumentV1<'a>]) -> Arguments<'a> {
|
||||
Arguments {
|
||||
|
|
@ -218,7 +223,8 @@ impl<'a> Arguments<'a> {
|
|||
/// created with `argumentusize`. However, failing to do so doesn't cause
|
||||
/// unsafety, but will ignore invalid .
|
||||
#[doc(hidden)] #[inline]
|
||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!")]
|
||||
#[unstable(feature = "fmt_internals", reason = "internal to format_args!",
|
||||
issue = "0")]
|
||||
pub fn new_v1_formatted(pieces: &'a [&'a str],
|
||||
args: &'a [ArgumentV1<'a>],
|
||||
fmt: &'a [rt::v1::Argument]) -> Arguments<'a> {
|
||||
|
|
@ -1077,19 +1083,23 @@ impl<'a> Formatter<'a> {
|
|||
pub fn flags(&self) -> u32 { self.flags }
|
||||
|
||||
/// Character used as 'fill' whenever there is alignment
|
||||
#[unstable(feature = "fmt_flags", reason = "method was just created")]
|
||||
#[unstable(feature = "fmt_flags", reason = "method was just created",
|
||||
issue = "27726")]
|
||||
pub fn fill(&self) -> char { self.fill }
|
||||
|
||||
/// Flag indicating what form of alignment was requested
|
||||
#[unstable(feature = "fmt_flags", reason = "method was just created")]
|
||||
#[unstable(feature = "fmt_flags", reason = "method was just created",
|
||||
issue = "27726")]
|
||||
pub fn align(&self) -> Alignment { self.align }
|
||||
|
||||
/// Optionally specified integer width that the output should be
|
||||
#[unstable(feature = "fmt_flags", reason = "method was just created")]
|
||||
#[unstable(feature = "fmt_flags", reason = "method was just created",
|
||||
issue = "27726")]
|
||||
pub fn width(&self) -> Option<usize> { self.width }
|
||||
|
||||
/// Optionally specified precision for numeric types
|
||||
#[unstable(feature = "fmt_flags", reason = "method was just created")]
|
||||
#[unstable(feature = "fmt_flags", reason = "method was just created",
|
||||
issue = "27726")]
|
||||
pub fn precision(&self) -> Option<usize> { self.precision }
|
||||
|
||||
/// Creates a `DebugStruct` builder designed to assist with creation of
|
||||
|
|
|
|||
|
|
@ -133,7 +133,8 @@ radix! { UpperHex, 16, "0x", x @ 0 ... 9 => b'0' + x,
|
|||
/// A radix with in the range of `2..36`.
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
#[unstable(feature = "fmt_radix",
|
||||
reason = "may be renamed or move to a different module")]
|
||||
reason = "may be renamed or move to a different module",
|
||||
issue = "27728")]
|
||||
pub struct Radix {
|
||||
base: u8,
|
||||
}
|
||||
|
|
@ -158,7 +159,8 @@ impl GenericRadix for Radix {
|
|||
|
||||
/// A helper type for formatting radixes.
|
||||
#[unstable(feature = "fmt_radix",
|
||||
reason = "may be renamed or move to a different module")]
|
||||
reason = "may be renamed or move to a different module",
|
||||
issue = "27728")]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct RadixFmt<T, R>(T, R);
|
||||
|
||||
|
|
@ -173,7 +175,8 @@ pub struct RadixFmt<T, R>(T, R);
|
|||
/// assert_eq!(format!("{}", radix(55, 36)), "1j".to_string());
|
||||
/// ```
|
||||
#[unstable(feature = "fmt_radix",
|
||||
reason = "may be renamed or move to a different module")]
|
||||
reason = "may be renamed or move to a different module",
|
||||
issue = "27728")]
|
||||
pub fn radix<T>(x: T, base: u8) -> RadixFmt<T, Radix> {
|
||||
RadixFmt(x, Radix::new(base))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@
|
|||
#![unstable(feature = "core_intrinsics",
|
||||
reason = "intrinsics are unlikely to ever be stabilized, instead \
|
||||
they should be used through stabilized interfaces \
|
||||
in the rest of the standard library")]
|
||||
in the rest of the standard library",
|
||||
issue = "0")]
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use marker::Sized;
|
||||
|
|
|
|||
|
|
@ -820,7 +820,8 @@ pub trait Iterator {
|
|||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "iter_cmp",
|
||||
reason = "may want to produce an Ordering directly; see #15311")]
|
||||
reason = "may want to produce an Ordering directly; see #15311",
|
||||
issue = "27724")]
|
||||
fn max_by<B: Ord, F>(self, f: F) -> Option<Self::Item> where
|
||||
Self: Sized,
|
||||
F: FnMut(&Self::Item) -> B,
|
||||
|
|
@ -849,7 +850,8 @@ pub trait Iterator {
|
|||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "iter_cmp",
|
||||
reason = "may want to produce an Ordering directly; see #15311")]
|
||||
reason = "may want to produce an Ordering directly; see #15311",
|
||||
issue = "27724")]
|
||||
fn min_by<B: Ord, F>(self, f: F) -> Option<Self::Item> where
|
||||
Self: Sized,
|
||||
F: FnMut(&Self::Item) -> B,
|
||||
|
|
@ -972,7 +974,8 @@ pub trait Iterator {
|
|||
/// let it = a.iter();
|
||||
/// assert_eq!(it.sum::<i32>(), 15);
|
||||
/// ```
|
||||
#[unstable(feature="iter_arith", reason = "bounds recently changed")]
|
||||
#[unstable(feature = "iter_arith", reason = "bounds recently changed",
|
||||
issue = "27739")]
|
||||
fn sum<S=<Self as Iterator>::Item>(self) -> S where
|
||||
S: Add<Self::Item, Output=S> + Zero,
|
||||
Self: Sized,
|
||||
|
|
@ -994,7 +997,8 @@ pub trait Iterator {
|
|||
/// assert_eq!(factorial(1), 1);
|
||||
/// assert_eq!(factorial(5), 120);
|
||||
/// ```
|
||||
#[unstable(feature="iter_arith", reason = "bounds recently changed")]
|
||||
#[unstable(feature="iter_arith", reason = "bounds recently changed",
|
||||
issue = "27739")]
|
||||
fn product<P=<Self as Iterator>::Item>(self) -> P where
|
||||
P: Mul<Self::Item, Output=P> + One,
|
||||
Self: Sized,
|
||||
|
|
@ -2136,8 +2140,9 @@ impl<I: DoubleEndedIterator, F> DoubleEndedIterator for Inspect<I, F>
|
|||
/// The `steps_between` function provides a way to efficiently compare
|
||||
/// two `Step` objects.
|
||||
#[unstable(feature = "step_trait",
|
||||
reason = "likely to be replaced by finer-grained traits")]
|
||||
pub trait Step: PartialOrd+Sized {
|
||||
reason = "likely to be replaced by finer-grained traits",
|
||||
issue = "27741")]
|
||||
pub trait Step: PartialOrd + Sized {
|
||||
/// Steps `self` if possible.
|
||||
fn step(&self, by: &Self) -> Option<Self>;
|
||||
|
||||
|
|
@ -2247,7 +2252,8 @@ step_impl_no_between!(u64 i64);
|
|||
/// parameter is the type being iterated over, while `R` is the range
|
||||
/// type (usually one of `std::ops::{Range, RangeFrom}`.
|
||||
#[derive(Clone)]
|
||||
#[unstable(feature = "step_by", reason = "recent addition")]
|
||||
#[unstable(feature = "step_by", reason = "recent addition",
|
||||
issue = "27741")]
|
||||
pub struct StepBy<A, R> {
|
||||
step_by: A,
|
||||
range: R,
|
||||
|
|
@ -2266,7 +2272,8 @@ impl<A: Step> RangeFrom<A> {
|
|||
/// ```
|
||||
///
|
||||
/// This prints all even `u8` values.
|
||||
#[unstable(feature = "step_by", reason = "recent addition")]
|
||||
#[unstable(feature = "step_by", reason = "recent addition",
|
||||
issue = "27741")]
|
||||
pub fn step_by(self, by: A) -> StepBy<A, Self> {
|
||||
StepBy {
|
||||
step_by: by,
|
||||
|
|
@ -2300,7 +2307,8 @@ impl<A: Step> ops::Range<A> {
|
|||
/// 6
|
||||
/// 8
|
||||
/// ```
|
||||
#[unstable(feature = "step_by", reason = "recent addition")]
|
||||
#[unstable(feature = "step_by", reason = "recent addition",
|
||||
issue = "27741")]
|
||||
pub fn step_by(self, by: A) -> StepBy<A, Self> {
|
||||
StepBy {
|
||||
step_by: by,
|
||||
|
|
@ -2332,7 +2340,8 @@ impl<A> Iterator for StepBy<A, RangeFrom<A>> where
|
|||
/// An iterator over the range [start, stop]
|
||||
#[derive(Clone)]
|
||||
#[unstable(feature = "range_inclusive",
|
||||
reason = "likely to be replaced by range notation and adapters")]
|
||||
reason = "likely to be replaced by range notation and adapters",
|
||||
issue = "27777")]
|
||||
pub struct RangeInclusive<A> {
|
||||
range: ops::Range<A>,
|
||||
done: bool,
|
||||
|
|
@ -2341,7 +2350,8 @@ pub struct RangeInclusive<A> {
|
|||
/// Returns an iterator over the range [start, stop].
|
||||
#[inline]
|
||||
#[unstable(feature = "range_inclusive",
|
||||
reason = "likely to be replaced by range notation and adapters")]
|
||||
reason = "likely to be replaced by range notation and adapters",
|
||||
issue = "27777")]
|
||||
pub fn range_inclusive<A>(start: A, stop: A) -> RangeInclusive<A>
|
||||
where A: Step + One + Clone
|
||||
{
|
||||
|
|
@ -2352,7 +2362,8 @@ pub fn range_inclusive<A>(start: A, stop: A) -> RangeInclusive<A>
|
|||
}
|
||||
|
||||
#[unstable(feature = "range_inclusive",
|
||||
reason = "likely to be replaced by range notation and adapters")]
|
||||
reason = "likely to be replaced by range notation and adapters",
|
||||
issue = "27777")]
|
||||
impl<A> Iterator for RangeInclusive<A> where
|
||||
A: PartialEq + Step + One + Clone,
|
||||
for<'a> &'a A: Add<&'a A, Output = A>
|
||||
|
|
@ -2385,7 +2396,8 @@ impl<A> Iterator for RangeInclusive<A> where
|
|||
}
|
||||
|
||||
#[unstable(feature = "range_inclusive",
|
||||
reason = "likely to be replaced by range notation and adapters")]
|
||||
reason = "likely to be replaced by range notation and adapters",
|
||||
issue = "27777")]
|
||||
impl<A> DoubleEndedIterator for RangeInclusive<A> where
|
||||
A: PartialEq + Step + One + Clone,
|
||||
for<'a> &'a A: Add<&'a A, Output = A>,
|
||||
|
|
@ -2642,7 +2654,8 @@ pub fn once<T>(value: T) -> Once<T> {
|
|||
///
|
||||
/// If two sequences are equal up until the point where one ends,
|
||||
/// the shorter sequence compares less.
|
||||
#[unstable(feature = "iter_order", reason = "needs review and revision")]
|
||||
#[unstable(feature = "iter_order", reason = "needs review and revision",
|
||||
issue = "27737")]
|
||||
pub mod order {
|
||||
use cmp;
|
||||
use cmp::{Eq, Ord, PartialOrd, PartialEq};
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@
|
|||
#![crate_name = "core"]
|
||||
#![unstable(feature = "core",
|
||||
reason = "the libcore library has not yet been scrutinized for \
|
||||
stabilization in terms of structure and naming")]
|
||||
stabilization in terms of structure and naming",
|
||||
issue = "27701")]
|
||||
#![staged_api]
|
||||
#![crate_type = "rlib"]
|
||||
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ pub trait Sized {
|
|||
}
|
||||
|
||||
/// Types that can be "unsized" to a dynamically sized type.
|
||||
#[unstable(feature = "unsize")]
|
||||
#[unstable(feature = "unsize", issue = "27779")]
|
||||
#[lang="unsize"]
|
||||
pub trait Unsize<T: ?Sized> {
|
||||
// Empty.
|
||||
|
|
@ -406,7 +406,8 @@ mod impls {
|
|||
/// [1]: http://en.wikipedia.org/wiki/Parametricity
|
||||
#[rustc_reflect_like]
|
||||
#[unstable(feature = "reflect_marker",
|
||||
reason = "requires RFC and more experience")]
|
||||
reason = "requires RFC and more experience",
|
||||
issue = "27749")]
|
||||
#[rustc_on_unimplemented = "`{Self}` does not implement `Any`; \
|
||||
ensure all type parameters are bounded by `Any`"]
|
||||
pub trait Reflect {}
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ pub unsafe fn zeroed<T>() -> T {
|
|||
/// This function is expected to be deprecated with the transition
|
||||
/// to non-zeroing drop.
|
||||
#[inline]
|
||||
#[unstable(feature = "filling_drop")]
|
||||
#[unstable(feature = "filling_drop", issue = "5016")]
|
||||
pub unsafe fn dropped<T>() -> T {
|
||||
#[inline(always)]
|
||||
unsafe fn dropped_impl<T>() -> T { intrinsics::init_dropped() }
|
||||
|
|
@ -510,22 +510,22 @@ macro_rules! repeat_u8_as_u64 {
|
|||
// But having the sign bit set is a pain, so 0x1d is probably better.
|
||||
//
|
||||
// And of course, 0x00 brings back the old world of zero'ing on drop.
|
||||
#[unstable(feature = "filling_drop")]
|
||||
#[unstable(feature = "filling_drop", issue = "5016")]
|
||||
#[allow(missing_docs)]
|
||||
pub const POST_DROP_U8: u8 = 0x1d;
|
||||
#[unstable(feature = "filling_drop")]
|
||||
#[unstable(feature = "filling_drop", issue = "5016")]
|
||||
#[allow(missing_docs)]
|
||||
pub const POST_DROP_U32: u32 = repeat_u8_as_u32!(POST_DROP_U8);
|
||||
#[unstable(feature = "filling_drop")]
|
||||
#[unstable(feature = "filling_drop", issue = "5016")]
|
||||
#[allow(missing_docs)]
|
||||
pub const POST_DROP_U64: u64 = repeat_u8_as_u64!(POST_DROP_U8);
|
||||
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
#[unstable(feature = "filling_drop")]
|
||||
#[unstable(feature = "filling_drop", issue = "5016")]
|
||||
#[allow(missing_docs)]
|
||||
pub const POST_DROP_USIZE: usize = POST_DROP_U32 as usize;
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
#[unstable(feature = "filling_drop")]
|
||||
#[unstable(feature = "filling_drop", issue = "5016")]
|
||||
#[allow(missing_docs)]
|
||||
pub const POST_DROP_USIZE: usize = POST_DROP_U64 as usize;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@
|
|||
|
||||
//! Exposes the NonZero lang item which provides optimization hints.
|
||||
#![unstable(feature = "nonzero",
|
||||
reason = "needs an RFC to flesh out the design")]
|
||||
reason = "needs an RFC to flesh out the design",
|
||||
issue = "27730")]
|
||||
|
||||
use marker::Sized;
|
||||
use ops::{CoerceUnsized, Deref};
|
||||
|
|
|
|||
|
|
@ -127,7 +127,8 @@ functions.
|
|||
// only made public for testing. do not expose us.
|
||||
#![doc(hidden)]
|
||||
#![unstable(feature = "flt2dec",
|
||||
reason = "internal routines only exposed for testing")]
|
||||
reason = "internal routines only exposed for testing",
|
||||
issue = "0")]
|
||||
|
||||
use prelude::v1::*;
|
||||
use i16;
|
||||
|
|
|
|||
|
|
@ -15,13 +15,15 @@ macro_rules! int_module { ($T:ty, $bits:expr) => (
|
|||
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
|
||||
// calling the `mem::size_of` function.
|
||||
#[unstable(feature = "num_bits_bytes",
|
||||
reason = "may want to be an associated function")]
|
||||
reason = "may want to be an associated function",
|
||||
issue = "27753")]
|
||||
#[allow(missing_docs)]
|
||||
pub const BITS : usize = $bits;
|
||||
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
|
||||
// calling the `mem::size_of` function.
|
||||
#[unstable(feature = "num_bits_bytes",
|
||||
reason = "may want to be an associated function")]
|
||||
reason = "may want to be an associated function",
|
||||
issue = "27753")]
|
||||
#[allow(missing_docs)]
|
||||
pub const BYTES : usize = ($bits / 8);
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ pub mod dec2flt;
|
|||
/// This trait is intended for use in conjunction with `Add`, as an identity:
|
||||
/// `x + T::zero() == x`.
|
||||
#[unstable(feature = "zero_one",
|
||||
reason = "unsure of placement, wants to use associated constants")]
|
||||
reason = "unsure of placement, wants to use associated constants",
|
||||
issue = "27739")]
|
||||
pub trait Zero {
|
||||
/// The "zero" (usually, additive identity) for this type.
|
||||
fn zero() -> Self;
|
||||
|
|
@ -62,7 +63,8 @@ pub trait Zero {
|
|||
/// This trait is intended for use in conjunction with `Mul`, as an identity:
|
||||
/// `x * T::one() == x`.
|
||||
#[unstable(feature = "zero_one",
|
||||
reason = "unsure of placement, wants to use associated constants")]
|
||||
reason = "unsure of placement, wants to use associated constants",
|
||||
issue = "27739")]
|
||||
pub trait One {
|
||||
/// The "one" (usually, multiplicative identity) for this type.
|
||||
fn one() -> Self;
|
||||
|
|
@ -1262,7 +1264,8 @@ pub enum FpCategory {
|
|||
/// A built-in floating point number.
|
||||
#[doc(hidden)]
|
||||
#[unstable(feature = "core_float",
|
||||
reason = "stable interface is via `impl f{32,64}` in later crates")]
|
||||
reason = "stable interface is via `impl f{32,64}` in later crates",
|
||||
issue = "27702")]
|
||||
pub trait Float: Sized {
|
||||
/// Returns the NaN value.
|
||||
fn nan() -> Self;
|
||||
|
|
@ -1525,7 +1528,8 @@ enum IntErrorKind {
|
|||
impl ParseIntError {
|
||||
#[unstable(feature = "int_error_internals",
|
||||
reason = "available through Error trait and this method should \
|
||||
not be exposed publicly")]
|
||||
not be exposed publicly",
|
||||
issue = "0")]
|
||||
#[doc(hidden)]
|
||||
pub fn __description(&self) -> &str {
|
||||
match self.kind {
|
||||
|
|
@ -1550,13 +1554,15 @@ impl fmt::Display for ParseIntError {
|
|||
pub struct ParseFloatError {
|
||||
#[doc(hidden)]
|
||||
#[unstable(feature = "float_error_internals",
|
||||
reason = "should not be exposed publicly")]
|
||||
reason = "should not be exposed publicly",
|
||||
issue = "0")]
|
||||
pub __kind: FloatErrorKind
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[unstable(feature = "float_error_internals",
|
||||
reason = "should not be exposed publicly")]
|
||||
reason = "should not be exposed publicly",
|
||||
issue = "0")]
|
||||
#[doc(hidden)]
|
||||
pub enum FloatErrorKind {
|
||||
Empty,
|
||||
|
|
|
|||
|
|
@ -13,11 +13,13 @@
|
|||
macro_rules! uint_module { ($T:ty, $T_SIGNED:ty, $bits:expr) => (
|
||||
|
||||
#[unstable(feature = "num_bits_bytes",
|
||||
reason = "may want to be an associated function")]
|
||||
reason = "may want to be an associated function",
|
||||
issue = "27753")]
|
||||
#[allow(missing_docs)]
|
||||
pub const BITS : usize = $bits;
|
||||
#[unstable(feature = "num_bits_bytes",
|
||||
reason = "may want to be an associated function")]
|
||||
reason = "may want to be an associated function",
|
||||
issue = "27753")]
|
||||
#[allow(missing_docs)]
|
||||
pub const BYTES : usize = ($bits / 8);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
// except according to those terms.
|
||||
|
||||
#![allow(missing_docs)]
|
||||
#![unstable(feature = "wrapping", reason = "may be removed or relocated")]
|
||||
#![unstable(feature = "wrapping", reason = "may be removed or relocated",
|
||||
issue = "27755")]
|
||||
|
||||
use super::Wrapping;
|
||||
|
||||
|
|
|
|||
|
|
@ -1247,7 +1247,7 @@ mod impls {
|
|||
|
||||
/// Trait that indicates that this is a pointer or a wrapper for one,
|
||||
/// where unsizing can be performed on the pointee.
|
||||
#[unstable(feature = "coerce_unsized")]
|
||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
||||
#[lang="coerce_unsized"]
|
||||
pub trait CoerceUnsized<T> {
|
||||
// Empty.
|
||||
|
|
@ -1293,7 +1293,7 @@ impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {}
|
|||
/// If evaluating EXPR fails, then the destructor for the
|
||||
/// implementation of Place to clean up any intermediate state
|
||||
/// (e.g. deallocate box storage, pop a stack, etc).
|
||||
#[unstable(feature = "placement_new_protocol")]
|
||||
#[unstable(feature = "placement_new_protocol", issue = "27779")]
|
||||
pub trait Place<Data: ?Sized> {
|
||||
/// Returns the address where the input value will be written.
|
||||
/// Note that the data at this address is generally uninitialized,
|
||||
|
|
@ -1324,7 +1324,7 @@ pub trait Place<Data: ?Sized> {
|
|||
/// Values for types implementing this trait usually are transient
|
||||
/// intermediate values (e.g. the return value of `Vec::emplace_back`)
|
||||
/// or `Copy`, since the `make_place` method takes `self` by value.
|
||||
#[unstable(feature = "placement_new_protocol")]
|
||||
#[unstable(feature = "placement_new_protocol", issue = "27779")]
|
||||
pub trait Placer<Data: ?Sized> {
|
||||
/// `Place` is the intermedate agent guarding the
|
||||
/// uninitialized state for `Data`.
|
||||
|
|
@ -1335,7 +1335,7 @@ pub trait Placer<Data: ?Sized> {
|
|||
}
|
||||
|
||||
/// Specialization of `Place` trait supporting `in (PLACE) EXPR`.
|
||||
#[unstable(feature = "placement_new_protocol")]
|
||||
#[unstable(feature = "placement_new_protocol", issue = "27779")]
|
||||
pub trait InPlace<Data: ?Sized>: Place<Data> {
|
||||
/// `Owner` is the type of the end value of `in (PLACE) EXPR`
|
||||
///
|
||||
|
|
@ -1372,7 +1372,7 @@ pub trait InPlace<Data: ?Sized>: Place<Data> {
|
|||
/// `<T as Boxed>` in turn dictates determines which
|
||||
/// implementation of `BoxPlace` to use, namely:
|
||||
/// `<<T as Boxed>::Place as BoxPlace>`.
|
||||
#[unstable(feature = "placement_new_protocol")]
|
||||
#[unstable(feature = "placement_new_protocol", issue = "27779")]
|
||||
pub trait Boxed {
|
||||
/// The kind of data that is stored in this kind of box.
|
||||
type Data; /* (`Data` unused b/c cannot yet express below bound.) */
|
||||
|
|
@ -1386,7 +1386,7 @@ pub trait Boxed {
|
|||
}
|
||||
|
||||
/// Specialization of `Place` trait supporting `box EXPR`.
|
||||
#[unstable(feature = "placement_new_protocol")]
|
||||
#[unstable(feature = "placement_new_protocol", issue = "27779")]
|
||||
pub trait BoxPlace<Data: ?Sized> : Place<Data> {
|
||||
/// Creates a globally fresh place.
|
||||
fn make_place() -> Self;
|
||||
|
|
|
|||
|
|
@ -287,7 +287,8 @@ impl<T> Option<T> {
|
|||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "as_slice",
|
||||
reason = "waiting for mut conventions")]
|
||||
reason = "waiting for mut conventions",
|
||||
issue = "27776")]
|
||||
pub fn as_mut_slice<'r>(&'r mut self) -> &'r mut [T] {
|
||||
match *self {
|
||||
Some(ref mut x) => {
|
||||
|
|
@ -689,7 +690,8 @@ impl<T> Option<T> {
|
|||
|
||||
/// Converts from `Option<T>` to `&[T]` (without copying)
|
||||
#[inline]
|
||||
#[unstable(feature = "as_slice", since = "unsure of the utility here")]
|
||||
#[unstable(feature = "as_slice", since = "unsure of the utility here",
|
||||
issue = "27776")]
|
||||
pub fn as_slice<'a>(&'a self) -> &'a [T] {
|
||||
match *self {
|
||||
Some(ref x) => slice::ref_slice(x),
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@
|
|||
#![allow(dead_code, missing_docs)]
|
||||
#![unstable(feature = "core_panic",
|
||||
reason = "internal details of the implementation of the `panic!` \
|
||||
and related macros")]
|
||||
and related macros",
|
||||
issue = "0")]
|
||||
|
||||
use fmt;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@
|
|||
|
||||
#![unstable(feature = "core_prelude",
|
||||
reason = "the libcore prelude has not been scrutinized and \
|
||||
stabilized yet")]
|
||||
stabilized yet",
|
||||
issue = "27701")]
|
||||
|
||||
// Reexported core operators
|
||||
pub use marker::{Copy, Send, Sized, Sync};
|
||||
|
|
|
|||
|
|
@ -127,7 +127,8 @@ pub unsafe fn read<T>(src: *const T) -> T {
|
|||
/// (which may be more appropriate than zero).
|
||||
#[inline(always)]
|
||||
#[unstable(feature = "filling_drop",
|
||||
reason = "may play a larger role in std::ptr future extensions")]
|
||||
reason = "may play a larger role in std::ptr future extensions",
|
||||
issue = "5016")]
|
||||
pub unsafe fn read_and_drop<T>(dest: *mut T) -> T {
|
||||
// Copy the data out from `dest`:
|
||||
let tmp = read(&*dest);
|
||||
|
|
@ -177,7 +178,8 @@ impl<T: ?Sized> *const T {
|
|||
#[unstable(feature = "ptr_as_ref",
|
||||
reason = "Option is not clearly the right return type, and we \
|
||||
may want to tie the return lifetime to a borrow of \
|
||||
the raw pointer")]
|
||||
the raw pointer",
|
||||
issue = "27780")]
|
||||
#[inline]
|
||||
pub unsafe fn as_ref<'a>(&self) -> Option<&'a T> where T: Sized {
|
||||
if self.is_null() {
|
||||
|
|
@ -225,7 +227,8 @@ impl<T: ?Sized> *mut T {
|
|||
#[unstable(feature = "ptr_as_ref",
|
||||
reason = "Option is not clearly the right return type, and we \
|
||||
may want to tie the return lifetime to a borrow of \
|
||||
the raw pointer")]
|
||||
the raw pointer",
|
||||
issue = "27780")]
|
||||
#[inline]
|
||||
pub unsafe fn as_ref<'a>(&self) -> Option<&'a T> where T: Sized {
|
||||
if self.is_null() {
|
||||
|
|
@ -258,7 +261,8 @@ impl<T: ?Sized> *mut T {
|
|||
/// of the returned pointer.
|
||||
#[unstable(feature = "ptr_as_ref",
|
||||
reason = "return value does not necessarily convey all possible \
|
||||
information")]
|
||||
information",
|
||||
issue = "27780")]
|
||||
#[inline]
|
||||
pub unsafe fn as_mut<'a>(&self) -> Option<&'a mut T> where T: Sized {
|
||||
if self.is_null() {
|
||||
|
|
@ -415,7 +419,8 @@ impl<T: ?Sized> PartialOrd for *mut T {
|
|||
/// modified without a unique path to the `Unique` reference. Useful
|
||||
/// for building abstractions like `Vec<T>` or `Box<T>`, which
|
||||
/// internally use raw pointers to manage the memory that they own.
|
||||
#[unstable(feature = "unique", reason = "needs an RFC to flesh out design")]
|
||||
#[unstable(feature = "unique", reason = "needs an RFC to flesh out design",
|
||||
issue = "27730")]
|
||||
pub struct Unique<T: ?Sized> {
|
||||
pointer: NonZero<*const T>,
|
||||
// NOTE: this marker has no consequences for variance, but is necessary
|
||||
|
|
@ -430,17 +435,17 @@ pub struct Unique<T: ?Sized> {
|
|||
/// reference is unaliased. Note that this aliasing invariant is
|
||||
/// unenforced by the type system; the abstraction using the
|
||||
/// `Unique` must enforce it.
|
||||
#[unstable(feature = "unique")]
|
||||
#[unstable(feature = "unique", issue = "27730")]
|
||||
unsafe impl<T: Send + ?Sized> Send for Unique<T> { }
|
||||
|
||||
/// `Unique` pointers are `Sync` if `T` is `Sync` because the data they
|
||||
/// reference is unaliased. Note that this aliasing invariant is
|
||||
/// unenforced by the type system; the abstraction using the
|
||||
/// `Unique` must enforce it.
|
||||
#[unstable(feature = "unique")]
|
||||
#[unstable(feature = "unique", issue = "27730")]
|
||||
unsafe impl<T: Sync + ?Sized> Sync for Unique<T> { }
|
||||
|
||||
#[unstable(feature = "unique")]
|
||||
#[unstable(feature = "unique", issue = "27730")]
|
||||
impl<T: ?Sized> Unique<T> {
|
||||
/// Creates a new `Unique`.
|
||||
pub unsafe fn new(ptr: *mut T) -> Unique<T> {
|
||||
|
|
@ -458,7 +463,7 @@ impl<T: ?Sized> Unique<T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "unique")]
|
||||
#[unstable(feature = "unique", issue= "27730")]
|
||||
impl<T:?Sized> Deref for Unique<T> {
|
||||
type Target = *mut T;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
#![allow(missing_docs)]
|
||||
#![unstable(feature = "raw")]
|
||||
#![unstable(feature = "raw", issue = "27751")]
|
||||
|
||||
//! Contains struct definitions for the layout of compiler built-in types.
|
||||
//!
|
||||
|
|
|
|||
|
|
@ -405,7 +405,8 @@ impl<T, E> Result<T, E> {
|
|||
|
||||
/// Converts from `Result<T, E>` to `&[T]` (without copying)
|
||||
#[inline]
|
||||
#[unstable(feature = "as_slice", since = "unsure of the utility here")]
|
||||
#[unstable(feature = "as_slice", since = "unsure of the utility here",
|
||||
issue = "27776")]
|
||||
pub fn as_slice(&self) -> &[T] {
|
||||
match *self {
|
||||
Ok(ref x) => slice::ref_slice(x),
|
||||
|
|
@ -436,7 +437,8 @@ impl<T, E> Result<T, E> {
|
|||
/// ```
|
||||
#[inline]
|
||||
#[unstable(feature = "as_slice",
|
||||
reason = "waiting for mut conventions")]
|
||||
reason = "waiting for mut conventions",
|
||||
issue = "27776")]
|
||||
pub fn as_mut_slice(&mut self) -> &mut [T] {
|
||||
match *self {
|
||||
Ok(ref mut x) => slice::mut_ref_slice(x),
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@
|
|||
//! warning.
|
||||
|
||||
#![unstable(feature = "core_simd",
|
||||
reason = "needs an RFC to flesh out the design")]
|
||||
reason = "needs an RFC to flesh out the design",
|
||||
issue = "27731")]
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(missing_docs)]
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ use raw::Slice as RawSlice;
|
|||
#[allow(missing_docs)] // docs in libcollections
|
||||
#[doc(hidden)]
|
||||
#[unstable(feature = "core_slice_ext",
|
||||
reason = "stable interface provided by `impl [T]` in later crates")]
|
||||
reason = "stable interface provided by `impl [T]` in later crates",
|
||||
issue = "27701")]
|
||||
pub trait SliceExt {
|
||||
type Item;
|
||||
|
||||
|
|
@ -797,7 +798,7 @@ impl<'a, T> Iter<'a, T> {
|
|||
///
|
||||
/// This has the same lifetime as the original slice, and so the
|
||||
/// iterator can continue to be used while this exists.
|
||||
#[unstable(feature = "iter_to_slice")]
|
||||
#[unstable(feature = "iter_to_slice", issue = "27775")]
|
||||
pub fn as_slice(&self) -> &'a [T] {
|
||||
make_slice!(self.ptr, self.end)
|
||||
}
|
||||
|
|
@ -845,7 +846,7 @@ impl<'a, T> IterMut<'a, T> {
|
|||
/// to consume the iterator. Consider using the `Slice` and
|
||||
/// `SliceMut` implementations for obtaining slices with more
|
||||
/// restricted lifetimes that do not consume the iterator.
|
||||
#[unstable(feature = "iter_to_slice")]
|
||||
#[unstable(feature = "iter_to_slice", issue = "27775")]
|
||||
pub fn into_slice(self) -> &'a mut [T] {
|
||||
make_mut_slice!(self.ptr, self.end)
|
||||
}
|
||||
|
|
@ -1408,7 +1409,7 @@ impl<'a, T> ExactSizeIterator for ChunksMut<'a, T> {}
|
|||
//
|
||||
|
||||
/// Converts a pointer to A into a slice of length 1 (without copying).
|
||||
#[unstable(feature = "ref_slice")]
|
||||
#[unstable(feature = "ref_slice", issue = "27774")]
|
||||
pub fn ref_slice<'a, A>(s: &'a A) -> &'a [A] {
|
||||
unsafe {
|
||||
from_raw_parts(s, 1)
|
||||
|
|
@ -1416,7 +1417,7 @@ pub fn ref_slice<'a, A>(s: &'a A) -> &'a [A] {
|
|||
}
|
||||
|
||||
/// Converts a pointer to A into a slice of length 1 (without copying).
|
||||
#[unstable(feature = "ref_slice")]
|
||||
#[unstable(feature = "ref_slice", issue = "27774")]
|
||||
pub fn mut_ref_slice<'a, A>(s: &'a mut A) -> &'a mut [A] {
|
||||
unsafe {
|
||||
from_raw_parts_mut(s, 1)
|
||||
|
|
@ -1478,7 +1479,8 @@ pub unsafe fn from_raw_parts_mut<'a, T>(p: *mut T, len: usize) -> &'a mut [T] {
|
|||
//
|
||||
|
||||
/// Operations on `[u8]`.
|
||||
#[unstable(feature = "slice_bytes", reason = "needs review")]
|
||||
#[unstable(feature = "slice_bytes", reason = "needs review",
|
||||
issue = "27740")]
|
||||
pub mod bytes {
|
||||
use ptr;
|
||||
use slice::SliceExt;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,8 @@ impl Utf8Error {
|
|||
///
|
||||
/// Starting at the index provided, but not necessarily at it precisely, an
|
||||
/// invalid UTF-8 encoding sequence was found.
|
||||
#[unstable(feature = "utf8_error", reason = "method just added")]
|
||||
#[unstable(feature = "utf8_error", reason = "method just added",
|
||||
issue = "27734")]
|
||||
pub fn valid_up_to(&self) -> usize { self.valid_up_to }
|
||||
}
|
||||
|
||||
|
|
@ -190,7 +191,7 @@ fn unwrap_or_0(opt: Option<&u8>) -> u8 {
|
|||
|
||||
/// Reads the next code point out of a byte iterator (assuming a
|
||||
/// UTF-8-like encoding).
|
||||
#[unstable(feature = "str_internals")]
|
||||
#[unstable(feature = "str_internals", issue = "0")]
|
||||
#[inline]
|
||||
pub fn next_code_point(bytes: &mut slice::Iter<u8>) -> Option<u32> {
|
||||
// Decode UTF-8
|
||||
|
|
@ -737,7 +738,8 @@ generate_pattern_iterators! {
|
|||
struct RMatchIndices;
|
||||
stability:
|
||||
#[unstable(feature = "str_match_indices",
|
||||
reason = "type may be removed or have its iterator impl changed")]
|
||||
reason = "type may be removed or have its iterator impl changed",
|
||||
issue = "27743")]
|
||||
internal:
|
||||
MatchIndicesInternal yielding ((usize, usize));
|
||||
delegate double ended;
|
||||
|
|
@ -1002,7 +1004,8 @@ static UTF8_CHAR_WIDTH: [u8; 256] = [
|
|||
#[unstable(feature = "str_char",
|
||||
reason = "existence of this struct is uncertain as it is frequently \
|
||||
able to be replaced with char.len_utf8() and/or \
|
||||
char/char_indices iterators")]
|
||||
char/char_indices iterators",
|
||||
issue = "27754")]
|
||||
pub struct CharRange {
|
||||
/// Current `char`
|
||||
pub ch: char,
|
||||
|
|
@ -1220,7 +1223,8 @@ mod traits {
|
|||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[unstable(feature = "core_str_ext",
|
||||
reason = "stable interface provided by `impl str` in later crates")]
|
||||
reason = "stable interface provided by `impl str` in later crates",
|
||||
issue = "27701")]
|
||||
pub trait StrExt {
|
||||
// NB there are no docs here are they're all located on the StrExt trait in
|
||||
// libcollections, not here.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@
|
|||
//! `ReverseSearcher` and `DoubleEndedSearcher`.
|
||||
|
||||
#![unstable(feature = "pattern",
|
||||
reason = "API not fully fleshed out and ready to be stabilized")]
|
||||
reason = "API not fully fleshed out and ready to be stabilized",
|
||||
issue = "27721")]
|
||||
|
||||
use prelude::v1::*;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue