diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 08e2eb040b4..093b3f57047 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -54,7 +54,7 @@ //! containers that can be cloned and shared between multiple parties. //! Because the contained values may be multiply-aliased, they can //! only be borrowed as shared references, not mutable references. -//! Without cells then it would be impossible to mutate data inside of +//! Without cells it would be impossible to mutate data inside of //! shared boxes at all! //! //! It's very common then to put a `RefCell` inside shared pointer @@ -104,7 +104,7 @@ //! // Take a reference to the inside of cache cell //! let mut cache = self.span_tree_cache.borrow_mut(); //! if cache.is_some() { -//! return cache.take_unwrap().clone(); +//! return cache.get_ref().clone(); //! } //! //! let span_tree = self.calc_span_tree(); @@ -118,14 +118,14 @@ //! // This is the major hazard of using `RefCell`. //! self.minimum_spanning_tree() //! } -//! # fn calc_span_tree(&self) -> Vec<(uint, uint)> { vec!() } +//! # fn calc_span_tree(&self) -> Vec<(uint, uint)> { vec![] } //! } //! # fn main() { } //! ``` //! //! ## Mutating implementations of `clone` //! -//! This is simply a special - bot common - case of the previous: +//! This is simply a special - but common - case of the previous: //! hiding mutability for operations that appear to be immutable. //! The `clone` method is expected to not change the source value, and //! is declared to take `&self`, not `&mut self`. Therefore any diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 516aad4f68f..ffb9b676e7d 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -14,11 +14,11 @@ //! Rust Standard Library](../std/index.html). It is the portable glue //! between the language and its libraries, defining the intrinsic and //! primitive building blocks of all Rust code. It links to no -//! upstream libraries, no system libraries, no libc. +//! upstream libraries, no system libraries, and no libc. //! //! The core library is *minimal*: it isn't even aware of heap allocation, //! nor does it provide concurrency or I/O. These things require -//! platform integration, and this library is platform-oblivious. +//! platform integration, and this library is platform-agnostic. //! //! *It is not recommended to use the core library*. The stable //! functionality of libcore is reexported from the diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index e6b301fbb9e..a9ec9c1ddc5 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -16,7 +16,7 @@ //! //! ## Intrinsic types and operations //! -//! The [`ptr`](../core/ptr/index.html), [`mem`](../core/mem/index.html), +//! The [`ptr`](../core/ptr/index.html) and [`mem`](../core/mem/index.html) //! modules deal with unsafe pointers and memory manipulation. //! [`kinds`](../core/kinds/index.html) defines the special built-in traits, //! and [`raw`](../core/raw/index.html) the runtime representation of Rust types.