Skip to content

Commit 807dffd

Browse files
committed
Minor library doc copyediting
1 parent 5f3f091 commit 807dffd

File tree

4 files changed

+9
-16
lines changed

4 files changed

+9
-16
lines changed

src/libcore/cell.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,10 @@
8888
//! ```
8989
//! extern crate collections;
9090
//!
91-
//! use collections::HashMap;
9291
//! use std::cell::RefCell;
9392
//!
9493
//! struct Graph {
95-
//! edges: HashMap<uint, uint>,
94+
//! edges: Vec<(uint, uint)>,
9695
//! span_tree_cache: RefCell<Option<Vec<(uint, uint)>>>
9796
//! }
9897
//!

src/libcore/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! The Rust Core Library
11+
//! # The Rust Core Library
1212
//!
1313
//! The Rust Core Library is the dependency-free foundation of [The
1414
//! Rust Standard Library](../std/index.html). It is the portable glue

src/libcore/ptr.rs

+6-11
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,18 @@
1010

1111
// FIXME: talk about offset, copy_memory, copy_nonoverlapping_memory
1212

13-
//! Conveniences for working with unsafe pointers, the `*T`, and `*mut T` types.
13+
//! Operations on unsafe pointers, `*T`, and `*mut T`.
1414
//!
15-
//! Working with unsafe pointers in Rust is fairly uncommon,
16-
//! and often limited to some narrow use cases: holding
17-
//! an unsafe pointer when safe pointers are unsuitable;
18-
//! checking for null; and converting back to safe pointers.
19-
//! As a result, there is not yet an abundance of library code
20-
//! for working with unsafe pointers, and in particular,
21-
//! since pointer math is fairly uncommon in Rust, it is not
22-
//! all that convenient.
15+
//! Working with unsafe pointers in Rust is uncommon,
16+
//! typically limited to a few patterns.
2317
//!
2418
//! Use the [`null` function](fn.null.html) to create null pointers,
2519
//! the [`is_null`](trait.RawPtr.html#tymethod.is_null)
2620
//! and [`is_not_null`](trait.RawPtr.html#method.is_not_null)
2721
//! methods of the [`RawPtr` trait](trait.RawPtr.html) to check for null.
2822
//! The `RawPtr` trait is imported by the prelude, so `is_null` etc.
29-
//! work everywhere.
23+
//! work everywhere. The `RawPtr` also defines the `offset` method,
24+
//! for pointer math.
3025
//!
3126
//! # Common ways to create unsafe pointers
3227
//!
@@ -316,7 +311,7 @@ pub unsafe fn array_each<T>(arr: **T, cb: |*T|) {
316311
array_each_with_len(arr, len, cb);
317312
}
318313

319-
/// Extension methods for raw pointers.
314+
/// Methods on raw pointers
320315
pub trait RawPtr<T> {
321316
/// Returns the null pointer.
322317
fn null() -> Self;

src/libstd/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
//! modules deal with unsafe pointers and memory manipulation.
2121
//! [`kinds`](../core/kinds/index.html) defines the special built-in traits,
2222
//! and [`raw`](../core/raw/index.html) the runtime representation of Rust types.
23-
//! These are some of the lowest-level building blocks of Rust
24-
//! abstractions.
23+
//! These are some of the lowest-level building blocks in Rust.
2524
//!
2625
//! ## Math on primitive types and math traits
2726
//!

0 commit comments

Comments
 (0)