Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ use heap::deallocate;
/// increase the reference counter.
///
/// ```
/// # #![feature(alloc, core)]
/// use std::sync::Arc;
/// use std::thread;
///
Expand Down Expand Up @@ -297,7 +296,6 @@ impl<T: ?Sized> Clone for Arc<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::sync::Arc;
///
/// let five = Arc::new(5);
Expand Down Expand Up @@ -392,7 +390,6 @@ impl<T: ?Sized> Drop for Arc<T> {
/// # Examples
///
/// ```
/// # #![feature(alloc)]
/// use std::sync::Arc;
///
/// {
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl String {
/// # Examples
///
/// ```
/// # #![feature(collections, core)]
/// # #![feature(collections)]
/// let s = String::from_str("hello");
/// assert_eq!(&s[..], "hello");
/// ```
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 0 additions & 2 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ extern "rust-intrinsic" {
/// A safe swap function:
///
/// ```
/// # #![feature(core)]
/// use std::mem;
/// use std::ptr;
///
Expand Down Expand Up @@ -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> {
Expand Down
13 changes: 2 additions & 11 deletions src/libcore/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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]);
Expand Down Expand Up @@ -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);
/// ```
Expand Down Expand Up @@ -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);
/// ```
Expand Down Expand Up @@ -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]);
Expand Down Expand Up @@ -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);
Expand All @@ -1084,7 +1076,6 @@ pub trait Iterator {
///
/// ```
/// # #![feature(core)]
///
/// fn factorial(n: u32) -> u32 {
/// (1..).take_while(|&i| i <= n).product()
/// }
Expand Down Expand Up @@ -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);
/// }
Expand Down
5 changes: 2 additions & 3 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 0 additions & 3 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ impl<T> Option<T> {
/// # Examples
///
/// ```
/// # #![feature(core)]
/// let x = Some("foo");
/// assert_eq!(x.ok_or(0), Ok("foo"));
///
Expand All @@ -496,7 +495,6 @@ impl<T> Option<T> {
/// # Examples
///
/// ```
/// # #![feature(core)]
/// let x = Some("foo");
/// assert_eq!(x.ok_or_else(|| 0), Ok("foo"));
///
Expand Down Expand Up @@ -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,
Expand Down