Skip to content

Remove i suffix in docs #20434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2015
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
52 changes: 26 additions & 26 deletions src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
//! use std::sync::Arc;
//! use std::thread::Thread;
//!
//! let five = Arc::new(5i);
//! let five = Arc::new(5);
//!
//! for i in range(0u, 10) {
//! let five = five.clone();
Expand All @@ -52,7 +52,7 @@
//! use std::sync::{Arc, Mutex};
//! use std::thread::Thread;
//!
//! let five = Arc::new(Mutex::new(5i));
//! let five = Arc::new(Mutex::new(5));
//!
//! for _ in range(0u, 10) {
//! let five = five.clone();
Expand Down Expand Up @@ -154,7 +154,7 @@ impl<T> Arc<T> {
/// ```
/// use std::sync::Arc;
///
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
/// ```
#[inline]
#[stable]
Expand All @@ -176,7 +176,7 @@ impl<T> Arc<T> {
/// ```
/// use std::sync::Arc;
///
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
///
/// let weak_five = five.downgrade();
/// ```
Expand Down Expand Up @@ -220,7 +220,7 @@ impl<T> Clone for Arc<T> {
/// ```
/// use std::sync::Arc;
///
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
///
/// five.clone();
/// ```
Expand Down Expand Up @@ -267,7 +267,7 @@ impl<T: Send + Sync + Clone> Arc<T> {
/// ```
/// use std::sync::Arc;
///
/// let mut five = Arc::new(5i);
/// let mut five = Arc::new(5);
///
/// let mut_five = five.make_unique();
/// ```
Expand Down Expand Up @@ -303,14 +303,14 @@ impl<T: Sync + Send> Drop for Arc<T> {
/// use std::sync::Arc;
///
/// {
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
///
/// // stuff
///
/// drop(five); // explict drop
/// }
/// {
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
///
/// // stuff
///
Expand Down Expand Up @@ -369,7 +369,7 @@ impl<T: Sync + Send> Weak<T> {
/// ```
/// use std::sync::Arc;
///
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
///
/// let weak_five = five.downgrade();
///
Expand Down Expand Up @@ -405,7 +405,7 @@ impl<T: Sync + Send> Clone for Weak<T> {
/// ```
/// use std::sync::Arc;
///
/// let weak_five = Arc::new(5i).downgrade();
/// let weak_five = Arc::new(5).downgrade();
///
/// weak_five.clone();
/// ```
Expand All @@ -430,15 +430,15 @@ impl<T: Sync + Send> Drop for Weak<T> {
/// use std::sync::Arc;
///
/// {
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
/// let weak_five = five.downgrade();
///
/// // stuff
///
/// drop(weak_five); // explict drop
/// }
/// {
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
/// let weak_five = five.downgrade();
///
/// // stuff
Expand Down Expand Up @@ -472,9 +472,9 @@ impl<T: PartialEq> PartialEq for Arc<T> {
/// ```
/// use std::sync::Arc;
///
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
///
/// five == Arc::new(5i);
/// five == Arc::new(5);
/// ```
fn eq(&self, other: &Arc<T>) -> bool { *(*self) == *(*other) }

Expand All @@ -487,9 +487,9 @@ impl<T: PartialEq> PartialEq for Arc<T> {
/// ```
/// use std::sync::Arc;
///
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
///
/// five != Arc::new(5i);
/// five != Arc::new(5);
/// ```
fn ne(&self, other: &Arc<T>) -> bool { *(*self) != *(*other) }
}
Expand All @@ -504,9 +504,9 @@ impl<T: PartialOrd> PartialOrd for Arc<T> {
/// ```
/// use std::sync::Arc;
///
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
///
/// five.partial_cmp(&Arc::new(5i));
/// five.partial_cmp(&Arc::new(5));
/// ```
fn partial_cmp(&self, other: &Arc<T>) -> Option<Ordering> {
(**self).partial_cmp(&**other)
Expand All @@ -521,9 +521,9 @@ impl<T: PartialOrd> PartialOrd for Arc<T> {
/// ```
/// use std::sync::Arc;
///
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
///
/// five < Arc::new(5i);
/// five < Arc::new(5);
/// ```
fn lt(&self, other: &Arc<T>) -> bool { *(*self) < *(*other) }

Expand All @@ -536,9 +536,9 @@ impl<T: PartialOrd> PartialOrd for Arc<T> {
/// ```
/// use std::sync::Arc;
///
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
///
/// five <= Arc::new(5i);
/// five <= Arc::new(5);
/// ```
fn le(&self, other: &Arc<T>) -> bool { *(*self) <= *(*other) }

Expand All @@ -551,9 +551,9 @@ impl<T: PartialOrd> PartialOrd for Arc<T> {
/// ```
/// use std::sync::Arc;
///
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
///
/// five > Arc::new(5i);
/// five > Arc::new(5);
/// ```
fn gt(&self, other: &Arc<T>) -> bool { *(*self) > *(*other) }

Expand All @@ -566,9 +566,9 @@ impl<T: PartialOrd> PartialOrd for Arc<T> {
/// ```
/// use std::sync::Arc;
///
/// let five = Arc::new(5i);
/// let five = Arc::new(5);
///
/// five >= Arc::new(5i);
/// five >= Arc::new(5);
/// ```
fn ge(&self, other: &Arc<T>) -> bool { *(*self) >= *(*other) }
}
Expand Down
54 changes: 27 additions & 27 deletions src/liballoc/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl<T> Rc<T> {
/// ```
/// use std::rc::Rc;
///
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
/// ```
#[stable]
pub fn new(value: T) -> Rc<T> {
Expand All @@ -214,7 +214,7 @@ impl<T> Rc<T> {
/// ```
/// use std::rc::Rc;
///
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// let weak_five = five.downgrade();
/// ```
Expand Down Expand Up @@ -247,7 +247,7 @@ pub fn strong_count<T>(this: &Rc<T>) -> uint { this.strong() }
/// use std::rc;
/// use std::rc::Rc;
///
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// rc::is_unique(&five);
/// ```
Expand Down Expand Up @@ -329,7 +329,7 @@ impl<T: Clone> Rc<T> {
/// ```
/// use std::rc::Rc;
///
/// let mut five = Rc::new(5i);
/// let mut five = Rc::new(5);
///
/// let mut_five = five.make_unique();
/// ```
Expand Down Expand Up @@ -378,14 +378,14 @@ impl<T> Drop for Rc<T> {
/// use std::rc::Rc;
///
/// {
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// // stuff
///
/// drop(five); // explict drop
/// }
/// {
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// // stuff
///
Expand Down Expand Up @@ -424,7 +424,7 @@ impl<T> Clone for Rc<T> {
/// ```
/// use std::rc::Rc;
///
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// five.clone();
/// ```
Expand Down Expand Up @@ -465,9 +465,9 @@ impl<T: PartialEq> PartialEq for Rc<T> {
/// ```
/// use std::rc::Rc;
///
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// five == Rc::new(5i);
/// five == Rc::new(5);
/// ```
#[inline(always)]
fn eq(&self, other: &Rc<T>) -> bool { **self == **other }
Expand All @@ -481,9 +481,9 @@ impl<T: PartialEq> PartialEq for Rc<T> {
/// ```
/// use std::rc::Rc;
///
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// five != Rc::new(5i);
/// five != Rc::new(5);
/// ```
#[inline(always)]
fn ne(&self, other: &Rc<T>) -> bool { **self != **other }
Expand All @@ -503,9 +503,9 @@ impl<T: PartialOrd> PartialOrd for Rc<T> {
/// ```
/// use std::rc::Rc;
///
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// five.partial_cmp(&Rc::new(5i));
/// five.partial_cmp(&Rc::new(5));
/// ```
#[inline(always)]
fn partial_cmp(&self, other: &Rc<T>) -> Option<Ordering> {
Expand All @@ -521,9 +521,9 @@ impl<T: PartialOrd> PartialOrd for Rc<T> {
/// ```
/// use std::rc::Rc;
///
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// five < Rc::new(5i);
/// five < Rc::new(5);
/// ```
#[inline(always)]
fn lt(&self, other: &Rc<T>) -> bool { **self < **other }
Expand All @@ -537,9 +537,9 @@ impl<T: PartialOrd> PartialOrd for Rc<T> {
/// ```
/// use std::rc::Rc;
///
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// five <= Rc::new(5i);
/// five <= Rc::new(5);
/// ```
#[inline(always)]
fn le(&self, other: &Rc<T>) -> bool { **self <= **other }
Expand All @@ -553,9 +553,9 @@ impl<T: PartialOrd> PartialOrd for Rc<T> {
/// ```
/// use std::rc::Rc;
///
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// five > Rc::new(5i);
/// five > Rc::new(5);
/// ```
#[inline(always)]
fn gt(&self, other: &Rc<T>) -> bool { **self > **other }
Expand All @@ -569,9 +569,9 @@ impl<T: PartialOrd> PartialOrd for Rc<T> {
/// ```
/// use std::rc::Rc;
///
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// five >= Rc::new(5i);
/// five >= Rc::new(5);
/// ```
#[inline(always)]
fn ge(&self, other: &Rc<T>) -> bool { **self >= **other }
Expand All @@ -588,9 +588,9 @@ impl<T: Ord> Ord for Rc<T> {
/// ```
/// use std::rc::Rc;
///
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// five.partial_cmp(&Rc::new(5i));
/// five.partial_cmp(&Rc::new(5));
/// ```
#[inline]
fn cmp(&self, other: &Rc<T>) -> Ordering { (**self).cmp(&**other) }
Expand Down Expand Up @@ -639,7 +639,7 @@ impl<T> Weak<T> {
/// ```
/// use std::rc::Rc;
///
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
///
/// let weak_five = five.downgrade();
///
Expand Down Expand Up @@ -668,15 +668,15 @@ impl<T> Drop for Weak<T> {
/// use std::rc::Rc;
///
/// {
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
/// let weak_five = five.downgrade();
///
/// // stuff
///
/// drop(weak_five); // explict drop
/// }
/// {
/// let five = Rc::new(5i);
/// let five = Rc::new(5);
/// let weak_five = five.downgrade();
///
/// // stuff
Expand Down Expand Up @@ -710,7 +710,7 @@ impl<T> Clone for Weak<T> {
/// ```
/// use std::rc::Rc;
///
/// let weak_five = Rc::new(5i).downgrade();
/// let weak_five = Rc::new(5).downgrade();
///
/// weak_five.clone();
/// ```
Expand Down
Loading