Remove many unneeded feature annotations in the docs
When things get stabilized, they don't always have their docs updated to remove the gate.
This commit is contained in:
parent
ef72938a8b
commit
a3b19c8858
@ -98,7 +98,6 @@ use heap::deallocate;
|
||||
/// increase the reference counter.
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(alloc, core)]
|
||||
/// use std::sync::Arc;
|
||||
/// use std::thread;
|
||||
///
|
||||
@ -297,7 +296,6 @@ impl<T: ?Sized> Clone for Arc<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(alloc)]
|
||||
/// use std::sync::Arc;
|
||||
///
|
||||
/// let five = Arc::new(5);
|
||||
@ -392,7 +390,6 @@ impl<T: ?Sized> Drop for Arc<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(alloc)]
|
||||
/// use std::sync::Arc;
|
||||
///
|
||||
/// {
|
||||
|
@ -88,7 +88,7 @@ impl String {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(collections, core)]
|
||||
/// # #![feature(collections)]
|
||||
/// let s = String::from_str("hello");
|
||||
/// assert_eq!(&s[..], "hello");
|
||||
/// ```
|
||||
|
@ -840,7 +840,7 @@ impl<T> Vec<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(collections, core)]
|
||||
/// # #![feature(collections)]
|
||||
/// let v = vec![0, 1, 2];
|
||||
/// let w = v.map_in_place(|i| i + 3);
|
||||
/// assert_eq!(&w[..], &[3, 4, 5]);
|
||||
|
@ -308,7 +308,6 @@ extern "rust-intrinsic" {
|
||||
/// A safe swap function:
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(core)]
|
||||
/// use std::mem;
|
||||
/// use std::ptr;
|
||||
///
|
||||
@ -348,7 +347,6 @@ extern "rust-intrinsic" {
|
||||
/// Efficiently create a Rust vector from an unsafe buffer:
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(core)]
|
||||
/// use std::ptr;
|
||||
///
|
||||
/// unsafe fn from_buf_raw<T>(ptr: *const T, elts: usize) -> Vec<T> {
|
||||
|
@ -326,7 +326,6 @@ pub trait Iterator {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(core)]
|
||||
/// let xs = [100, 200, 300];
|
||||
/// let mut it = xs.iter().cloned().peekable();
|
||||
/// assert_eq!(*it.peek().unwrap(), 100);
|
||||
@ -514,15 +513,13 @@ pub trait Iterator {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(core)]
|
||||
///
|
||||
/// let a = [1, 4, 2, 3, 8, 9, 6];
|
||||
/// let sum: i32 = a.iter()
|
||||
/// .map(|x| *x)
|
||||
/// .inspect(|&x| println!("filtering {}", x))
|
||||
/// .filter(|&x| x % 2 == 0)
|
||||
/// .inspect(|&x| println!("{} made it through", x))
|
||||
/// .sum();
|
||||
/// .fold(0, |sum, i| sum + i);
|
||||
/// println!("{}", sum);
|
||||
/// ```
|
||||
#[inline]
|
||||
@ -572,7 +569,6 @@ pub trait Iterator {
|
||||
/// do not.
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(core)]
|
||||
/// let vec = vec![1, 2, 3, 4];
|
||||
/// let (even, odd): (Vec<_>, Vec<_>) = vec.into_iter().partition(|&n| n % 2 == 0);
|
||||
/// assert_eq!(even, [2, 4]);
|
||||
@ -897,7 +893,6 @@ pub trait Iterator {
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(core)]
|
||||
///
|
||||
/// let a = [-3_i32, 0, 1, 5, -10];
|
||||
/// assert_eq!(*a.iter().max_by(|x| x.abs()).unwrap(), -10);
|
||||
/// ```
|
||||
@ -926,7 +921,6 @@ pub trait Iterator {
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(core)]
|
||||
///
|
||||
/// let a = [-3_i32, 0, 1, 5, -10];
|
||||
/// assert_eq!(*a.iter().min_by(|x| x.abs()).unwrap(), 0);
|
||||
/// ```
|
||||
@ -971,7 +965,6 @@ pub trait Iterator {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(core)]
|
||||
/// let a = [(1, 2), (3, 4)];
|
||||
/// let (left, right): (Vec<_>, Vec<_>) = a.iter().cloned().unzip();
|
||||
/// assert_eq!(left, [1, 3]);
|
||||
@ -1065,7 +1058,6 @@ pub trait Iterator {
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(core)]
|
||||
///
|
||||
/// let a = [1, 2, 3, 4, 5];
|
||||
/// let it = a.iter();
|
||||
/// assert_eq!(it.sum::<i32>(), 15);
|
||||
@ -1084,7 +1076,6 @@ pub trait Iterator {
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(core)]
|
||||
///
|
||||
/// fn factorial(n: u32) -> u32 {
|
||||
/// (1..).take_while(|&i| i <= n).product()
|
||||
/// }
|
||||
@ -2730,7 +2721,7 @@ impl<A: Step> ops::Range<A> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(step_by, core)]
|
||||
/// # #![feature(step_by)]
|
||||
/// for i in (0..10).step_by(2) {
|
||||
/// println!("{}", i);
|
||||
/// }
|
||||
|
@ -173,12 +173,11 @@ macro_rules! try {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![allow(unused_must_use)]
|
||||
/// use std::io::Write;
|
||||
///
|
||||
/// let mut w = Vec::new();
|
||||
/// write!(&mut w, "test");
|
||||
/// write!(&mut w, "formatted {}", "arguments");
|
||||
/// write!(&mut w, "test").unwrap();
|
||||
/// write!(&mut w, "formatted {}", "arguments").unwrap();
|
||||
/// ```
|
||||
#[macro_export]
|
||||
macro_rules! write {
|
||||
|
@ -474,7 +474,6 @@ impl<T> Option<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(core)]
|
||||
/// let x = Some("foo");
|
||||
/// assert_eq!(x.ok_or(0), Ok("foo"));
|
||||
///
|
||||
@ -496,7 +495,6 @@ impl<T> Option<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(core)]
|
||||
/// let x = Some("foo");
|
||||
/// assert_eq!(x.ok_or_else(|| 0), Ok("foo"));
|
||||
///
|
||||
@ -538,7 +536,6 @@ impl<T> Option<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # #![feature(core)]
|
||||
/// let mut x = Some(4);
|
||||
/// match x.iter_mut().next() {
|
||||
/// Some(&mut ref mut v) => *v = 42,
|
||||
|
Loading…
x
Reference in New Issue
Block a user