about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-05-23 13:21:25 -0700
committerbors <bors@rust-lang.org>2014-05-23 13:21:25 -0700
commit53db981148eb359f63ecfe4cf9815b5ed0da8f3f (patch)
tree6dff1abf8bd0fac9b97426a84775cf7af5996b52 /src
parentc329a1fcdc6a4a2931409540c8173a112fe63395 (diff)
parent807dffde1801e0107274daff45cbb13e5f22bc59 (diff)
downloadrust-53db981148eb359f63ecfe4cf9815b5ed0da8f3f.tar.gz
rust-53db981148eb359f63ecfe4cf9815b5ed0da8f3f.zip
auto merge of #14359 : brson/rust/minordoc, r=alexcrichton
Diffstat (limited to 'src')
-rw-r--r--src/libcore/cell.rs3
-rw-r--r--src/libcore/lib.rs2
-rw-r--r--src/libcore/ptr.rs17
-rw-r--r--src/libstd/lib.rs3
4 files changed, 9 insertions, 16 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs
index 3b1322cdc1b..4d630db898b 100644
--- a/src/libcore/cell.rs
+++ b/src/libcore/cell.rs
@@ -88,11 +88,10 @@
 //! ```
 //! extern crate collections;
 //!
-//! use collections::HashMap;
 //! use std::cell::RefCell;
 //!
 //! struct Graph {
-//!     edges: HashMap<uint, uint>,
+//!     edges: Vec<(uint, uint)>,
 //!     span_tree_cache: RefCell<Option<Vec<(uint, uint)>>>
 //! }
 //!
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 6de7e8bcaca..0ddd3d8fd56 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-//! The Rust Core Library
+//! # The Rust Core Library
 //!
 //! The Rust Core Library is the dependency-free foundation of [The
 //! Rust Standard Library](../std/index.html). It is the portable glue
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 90b5b0d8753..13d803a6b0e 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -10,23 +10,18 @@
 
 // FIXME: talk about offset, copy_memory, copy_nonoverlapping_memory
 
-//! Conveniences for working with unsafe pointers, the `*T`, and `*mut T` types.
+//! Operations on unsafe pointers, `*T`, and `*mut T`.
 //!
-//! Working with unsafe pointers in Rust is fairly uncommon,
-//! and often limited to some narrow use cases: holding
-//! an unsafe pointer when safe pointers are unsuitable;
-//! checking for null; and converting back to safe pointers.
-//! As a result, there is not yet an abundance of library code
-//! for working with unsafe pointers, and in particular,
-//! since pointer math is fairly uncommon in Rust, it is not
-//! all that convenient.
+//! Working with unsafe pointers in Rust is uncommon,
+//! typically limited to a few patterns.
 //!
 //! Use the [`null` function](fn.null.html) to create null pointers,
 //! the [`is_null`](trait.RawPtr.html#tymethod.is_null)
 //! and [`is_not_null`](trait.RawPtr.html#method.is_not_null)
 //! methods of the [`RawPtr` trait](trait.RawPtr.html) to check for null.
 //! The `RawPtr` trait is imported by the prelude, so `is_null` etc.
-//! work everywhere.
+//! work everywhere. The `RawPtr` also defines the `offset` method,
+//! for pointer math.
 //!
 //! # Common ways to create unsafe pointers
 //!
@@ -316,7 +311,7 @@ pub unsafe fn array_each<T>(arr: **T, cb: |*T|) {
     array_each_with_len(arr, len, cb);
 }
 
-/// Extension methods for raw pointers.
+/// Methods on raw pointers
 pub trait RawPtr<T> {
     /// Returns the null pointer.
     fn null() -> Self;
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 51cf2aabf55..8a7d3f39472 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -20,8 +20,7 @@
 //! 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.
-//! These are some of the lowest-level building blocks of Rust
-//! abstractions.
+//! These are some of the lowest-level building blocks in Rust.
 //!
 //! ## Math on primitive types and math traits
 //!