Skip to content

Commit 64d32b0

Browse files
committed
Auto merge of #26066 - steveklabnik:docs_on_a_plane, r=alexcrichton
When things get stabilized, they don't always have their docs updated to remove the gate.
2 parents ae74652 + a3b19c8 commit 64d32b0

File tree

7 files changed

+6
-24
lines changed

7 files changed

+6
-24
lines changed

src/liballoc/arc.rs

-3
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ use heap::deallocate;
9898
/// increase the reference counter.
9999
///
100100
/// ```
101-
/// # #![feature(alloc, core)]
102101
/// use std::sync::Arc;
103102
/// use std::thread;
104103
///
@@ -297,7 +296,6 @@ impl<T: ?Sized> Clone for Arc<T> {
297296
/// # Examples
298297
///
299298
/// ```
300-
/// # #![feature(alloc)]
301299
/// use std::sync::Arc;
302300
///
303301
/// let five = Arc::new(5);
@@ -392,7 +390,6 @@ impl<T: ?Sized> Drop for Arc<T> {
392390
/// # Examples
393391
///
394392
/// ```
395-
/// # #![feature(alloc)]
396393
/// use std::sync::Arc;
397394
///
398395
/// {

src/libcollections/string.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl String {
8888
/// # Examples
8989
///
9090
/// ```
91-
/// # #![feature(collections, core)]
91+
/// # #![feature(collections)]
9292
/// let s = String::from_str("hello");
9393
/// assert_eq!(&s[..], "hello");
9494
/// ```

src/libcollections/vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ impl<T> Vec<T> {
840840
/// # Examples
841841
///
842842
/// ```
843-
/// # #![feature(collections, core)]
843+
/// # #![feature(collections)]
844844
/// let v = vec![0, 1, 2];
845845
/// let w = v.map_in_place(|i| i + 3);
846846
/// assert_eq!(&w[..], &[3, 4, 5]);

src/libcore/intrinsics.rs

-2
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ extern "rust-intrinsic" {
308308
/// A safe swap function:
309309
///
310310
/// ```
311-
/// # #![feature(core)]
312311
/// use std::mem;
313312
/// use std::ptr;
314313
///
@@ -348,7 +347,6 @@ extern "rust-intrinsic" {
348347
/// Efficiently create a Rust vector from an unsafe buffer:
349348
///
350349
/// ```
351-
/// # #![feature(core)]
352350
/// use std::ptr;
353351
///
354352
/// unsafe fn from_buf_raw<T>(ptr: *const T, elts: usize) -> Vec<T> {

src/libcore/iter.rs

+2-11
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ pub trait Iterator {
326326
/// # Examples
327327
///
328328
/// ```
329-
/// # #![feature(core)]
330329
/// let xs = [100, 200, 300];
331330
/// let mut it = xs.iter().cloned().peekable();
332331
/// assert_eq!(*it.peek().unwrap(), 100);
@@ -514,15 +513,13 @@ pub trait Iterator {
514513
/// # Examples
515514
///
516515
/// ```
517-
/// # #![feature(core)]
518-
///
519516
/// let a = [1, 4, 2, 3, 8, 9, 6];
520517
/// let sum: i32 = a.iter()
521518
/// .map(|x| *x)
522519
/// .inspect(|&x| println!("filtering {}", x))
523520
/// .filter(|&x| x % 2 == 0)
524521
/// .inspect(|&x| println!("{} made it through", x))
525-
/// .sum();
522+
/// .fold(0, |sum, i| sum + i);
526523
/// println!("{}", sum);
527524
/// ```
528525
#[inline]
@@ -572,7 +569,6 @@ pub trait Iterator {
572569
/// do not.
573570
///
574571
/// ```
575-
/// # #![feature(core)]
576572
/// let vec = vec![1, 2, 3, 4];
577573
/// let (even, odd): (Vec<_>, Vec<_>) = vec.into_iter().partition(|&n| n % 2 == 0);
578574
/// assert_eq!(even, [2, 4]);
@@ -897,7 +893,6 @@ pub trait Iterator {
897893
///
898894
/// ```
899895
/// # #![feature(core)]
900-
///
901896
/// let a = [-3_i32, 0, 1, 5, -10];
902897
/// assert_eq!(*a.iter().max_by(|x| x.abs()).unwrap(), -10);
903898
/// ```
@@ -926,7 +921,6 @@ pub trait Iterator {
926921
///
927922
/// ```
928923
/// # #![feature(core)]
929-
///
930924
/// let a = [-3_i32, 0, 1, 5, -10];
931925
/// assert_eq!(*a.iter().min_by(|x| x.abs()).unwrap(), 0);
932926
/// ```
@@ -971,7 +965,6 @@ pub trait Iterator {
971965
/// # Examples
972966
///
973967
/// ```
974-
/// # #![feature(core)]
975968
/// let a = [(1, 2), (3, 4)];
976969
/// let (left, right): (Vec<_>, Vec<_>) = a.iter().cloned().unzip();
977970
/// assert_eq!(left, [1, 3]);
@@ -1065,7 +1058,6 @@ pub trait Iterator {
10651058
///
10661059
/// ```
10671060
/// # #![feature(core)]
1068-
///
10691061
/// let a = [1, 2, 3, 4, 5];
10701062
/// let it = a.iter();
10711063
/// assert_eq!(it.sum::<i32>(), 15);
@@ -1084,7 +1076,6 @@ pub trait Iterator {
10841076
///
10851077
/// ```
10861078
/// # #![feature(core)]
1087-
///
10881079
/// fn factorial(n: u32) -> u32 {
10891080
/// (1..).take_while(|&i| i <= n).product()
10901081
/// }
@@ -2730,7 +2721,7 @@ impl<A: Step> ops::Range<A> {
27302721
/// # Examples
27312722
///
27322723
/// ```
2733-
/// # #![feature(step_by, core)]
2724+
/// # #![feature(step_by)]
27342725
/// for i in (0..10).step_by(2) {
27352726
/// println!("{}", i);
27362727
/// }

src/libcore/macros.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,11 @@ macro_rules! try {
173173
/// # Examples
174174
///
175175
/// ```
176-
/// # #![allow(unused_must_use)]
177176
/// use std::io::Write;
178177
///
179178
/// let mut w = Vec::new();
180-
/// write!(&mut w, "test");
181-
/// write!(&mut w, "formatted {}", "arguments");
179+
/// write!(&mut w, "test").unwrap();
180+
/// write!(&mut w, "formatted {}", "arguments").unwrap();
182181
/// ```
183182
#[macro_export]
184183
macro_rules! write {

src/libcore/option.rs

-3
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,6 @@ impl<T> Option<T> {
474474
/// # Examples
475475
///
476476
/// ```
477-
/// # #![feature(core)]
478477
/// let x = Some("foo");
479478
/// assert_eq!(x.ok_or(0), Ok("foo"));
480479
///
@@ -496,7 +495,6 @@ impl<T> Option<T> {
496495
/// # Examples
497496
///
498497
/// ```
499-
/// # #![feature(core)]
500498
/// let x = Some("foo");
501499
/// assert_eq!(x.ok_or_else(|| 0), Ok("foo"));
502500
///
@@ -538,7 +536,6 @@ impl<T> Option<T> {
538536
/// # Examples
539537
///
540538
/// ```
541-
/// # #![feature(core)]
542539
/// let mut x = Some(4);
543540
/// match x.iter_mut().next() {
544541
/// Some(&mut ref mut v) => *v = 42,

0 commit comments

Comments
 (0)