Skip to content

Rollup of 16 pull requests #24297

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

Closed
wants to merge 35 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
549bd55
resurrect research paper list #24004
Apr 9, 2015
c3aa057
Add regression test for #19097
aturon Apr 9, 2015
644a75e
Fix `borrow` docs
apasel422 Apr 9, 2015
69f63e9
Indicate keyword in doc comment is code-like
frewsxcv Apr 9, 2015
8578fee
Don't use skolemized parameters but rather fresh variables in
nikomatsakis Apr 9, 2015
9eb8528
Copyediting for 'variable bindings'
steveklabnik Apr 9, 2015
bf88539
TRPL: new introduction
steveklabnik Apr 9, 2015
7bb0cd7
Write the 'primitive types' section of TRPL
steveklabnik Apr 9, 2015
2a88b79
Add tests for E-needstest issues
lgrz Apr 10, 2015
16574e3
Replace the use of the rather randomly named boolean `custom` to mean
nikomatsakis Apr 9, 2015
5156b3a
Modify the codemap code to use more slices and to information about
nikomatsakis Apr 9, 2015
906a972
Add a new `span_suggestion` infrastructure. This lets you edit a snippet
nikomatsakis Apr 9, 2015
e313b33
Improve error message where a closure escapes fn while trying to borrow
nikomatsakis Apr 9, 2015
e66569e
Fix pow docs to not use Int
steveklabnik Apr 10, 2015
cdce32f
Changed the wording of the documentation for the insert method for Ve…
djallen89 Apr 10, 2015
c2fa1f7
Doc: remove a "safety note" made obsolete by dropck for TypedArena
SimonSapin Apr 10, 2015
7bf1da1
s/Panicks/Panics/
apasel422 Apr 10, 2015
288b1c9
Add examples for Convert
steveklabnik Apr 6, 2015
9e68d23
Fix mistake in documentation
xamgore Apr 10, 2015
911f5b8
Rollup merge of #24121 - steveklabnik:gh24107, r=steveklabnik
steveklabnik Apr 10, 2015
2c05a7e
Rollup merge of #24234 - thiagooak:academic-research, r=steveklabnik
steveklabnik Apr 10, 2015
df4ec81
Rollup merge of #24236 - aturon:issue-19097, r=alexcrichton
steveklabnik Apr 10, 2015
d248304
Rollup merge of #24239 - steveklabnik:editing_pass, r=steveklabnik
steveklabnik Apr 10, 2015
6047d17
Rollup merge of #24240 - apasel422:patch-1, r=aturon
steveklabnik Apr 10, 2015
a1e0a84
Rollup merge of #24242 - nikomatsakis:escaping-closure-error-message,…
steveklabnik Apr 10, 2015
e7a7d88
Rollup merge of #24243 - frewsxcv:patch-13, r=steveklabnik
steveklabnik Apr 10, 2015
7c9697e
Rollup merge of #24245 - nikomatsakis:issue-24241-coherence-failure, …
steveklabnik Apr 10, 2015
fde5e02
Rollup merge of #24247 - steveklabnik:update_variable_bindings, r=huonw
steveklabnik Apr 10, 2015
95465e3
Rollup merge of #24253 - steveklabnik:doc_primitive_types, r=alexcric…
steveklabnik Apr 10, 2015
66594c9
Rollup merge of #24259 - lstat:needstest, r=alexcrichton
steveklabnik Apr 10, 2015
7bf6663
Rollup merge of #24274 - steveklabnik:fix_pow_docs, r=nikomatsakis
steveklabnik Apr 10, 2015
b60e225
Rollup merge of #24279 - libfud:vec_insertion_docs, r=steveklabnik
steveklabnik Apr 10, 2015
101ff25
Rollup merge of #24282 - SimonSapin:patch-6, r=pnkfelix
steveklabnik Apr 10, 2015
87de40e
Rollup merge of #24283 - apasel422:patch-2, r=alexcrichton
steveklabnik Apr 10, 2015
de489dd
Rollup merge of #24291 - xamgore:patch-1, r=steveklabnik
steveklabnik Apr 10, 2015
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
18 changes: 9 additions & 9 deletions src/libcollections/borrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use self::Cow::*;
/// Borrow<Vec<T>>` and `Vec<T>: Borrow<[T]>`.
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Borrow<Borrowed: ?Sized> {
/// Immutably borrow from an owned value.
/// Immutably borrows from an owned value.
///
/// # Examples
///
Expand Down Expand Up @@ -67,7 +67,7 @@ pub trait Borrow<Borrowed: ?Sized> {
/// Similar to `Borrow`, but for mutable borrows.
#[stable(feature = "rust1", since = "1.0.0")]
pub trait BorrowMut<Borrowed: ?Sized> : Borrow<Borrowed> {
/// Mutably borrow from an owned value.
/// Mutably borrows from an owned value.
///
/// # Examples
///
Expand Down Expand Up @@ -126,7 +126,7 @@ impl<'a, B: ?Sized> Borrow<B> for Cow<'a, B> where B: ToOwned, <B as ToOwned>::O
}
}

/// A generalization of Clone to borrowed data.
/// A generalization of `Clone` to borrowed data.
///
/// Some types make it possible to go from borrowed to owned, usually by
/// implementing the `Clone` trait. But `Clone` works only for going from `&T`
Expand All @@ -137,7 +137,7 @@ pub trait ToOwned {
#[stable(feature = "rust1", since = "1.0.0")]
type Owned: Borrow<Self>;

/// Create owned data from borrowed data, usually by copying.
/// Creates owned data from borrowed data, usually by cloning.
#[stable(feature = "rust1", since = "1.0.0")]
fn to_owned(&self) -> Self::Owned;
}
Expand All @@ -155,9 +155,9 @@ impl<T> ToOwned for T where T: Clone {
/// data lazily when mutation or ownership is required. The type is designed to
/// work with general borrowed data via the `Borrow` trait.
///
/// `Cow` implements both `Deref`, which means that you can call
/// `Cow` implements `Deref`, which means that you can call
/// non-mutating methods directly on the data it encloses. If mutation
/// is desired, `to_mut` will obtain a mutable references to an owned
/// is desired, `to_mut` will obtain a mutable reference to an owned
/// value, cloning if necessary.
///
/// # Examples
Expand Down Expand Up @@ -200,7 +200,7 @@ impl<'a, B: ?Sized> Clone for Cow<'a, B> where B: ToOwned {
}

impl<'a, B: ?Sized> Cow<'a, B> where B: ToOwned {
/// Acquire a mutable reference to the owned form of the data.
/// Acquires a mutable reference to the owned form of the data.
///
/// Copies the data if it is not already owned.
///
Expand All @@ -226,7 +226,7 @@ impl<'a, B: ?Sized> Cow<'a, B> where B: ToOwned {
}
}

/// Extract the owned data.
/// Extracts the owned data.
///
/// Copies the data if it is not already owned.
///
Expand Down Expand Up @@ -327,7 +327,7 @@ impl<'a, B: ?Sized> Hash for Cow<'a, B> where B: Hash + ToOwned
}
}

/// Trait for moving into a `Cow`
/// Trait for moving into a `Cow`.
#[unstable(feature = "into_cow", reason = "may be replaced by `convert::Into`")]
pub trait IntoCow<'a, B: ?Sized> where B: ToOwned {
/// Moves `self` into `Cow`
Expand Down