Skip to content

Commit d084d9e

Browse files
committed
auto merge of rust-lang#7197 : rkbodenner/rust/doc-for-lib-move, r=brson
Was updating some code of mine to use the new `std`/`extra` library names, and noticed a place where docs for `std::libc` hadn't been updated. Then I updated some top-level docs for the new libraries' names, too.
2 parents 4c90b98 + 5acc8e5 commit d084d9e

File tree

4 files changed

+29
-25
lines changed

4 files changed

+29
-25
lines changed

src/README.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Source layout:
44

55
librustc/ The self-hosted compiler
66

7-
libcore/ The core library (imported and linked by default)
8-
libstd/ The standard library (slightly more peripheral code)
7+
libstd/ The standard library (imported and linked by default)
8+
libextra/ The "extras" library (slightly more peripheral code)
99
libsyntax/ The Rust parser and pretty-printer
1010

1111
rt/ The runtime system

src/libextra/std.rc

+9-6
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,22 @@
1010

1111
/*!
1212

13-
The Rust standard library.
13+
Rust extras.
1414

15-
The Rust standand library provides a number of useful features that are
16-
not required in or otherwise suitable for the core library.
15+
The `extra` crate is a set of useful modules for a variety of
16+
purposes, including collections, numerics, I/O, serialization,
17+
and concurrency.
18+
19+
Rust extras are part of the standard Rust distribution.
1720

1821
*/
1922

2023
#[link(name = "extra",
2124
vers = "0.7-pre",
2225
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
23-
url = "https://github.com/mozilla/rust/tree/master/src/libstd")];
26+
url = "https://github.com/mozilla/rust/tree/master/src/libextra")];
2427

25-
#[comment = "The Rust standard library"];
28+
#[comment = "Rust extras"];
2629
#[license = "MIT/ASL2"];
2730
#[crate_type = "lib"];
2831

@@ -128,7 +131,7 @@ pub mod test;
128131
pub mod serialize;
129132

130133
// A curious inner-module that's not exported that contains the binding
131-
// 'extra' so that macro-expanded references to std::serialize and such
134+
// 'extra' so that macro-expanded references to extra::serialize and such
132135
// can be resolved within libextra.
133136
#[doc(hidden)]
134137
pub mod std {

src/libstd/core.rc

+16-15
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@
1212

1313
# The Rust standard library
1414

15-
The Rust standard library provides runtime features required by the language,
16-
including the task scheduler and memory allocators, as well as library
17-
support for Rust built-in types, platform abstractions, and other commonly
18-
used features.
19-
20-
`std` includes modules corresponding to each of the integer types, each of
21-
the floating point types, the `bool` type, tuples, characters, strings
22-
(`str`), vectors (`vec`), managed boxes (`managed`), owned boxes (`owned`),
23-
and unsafe and borrowed pointers (`ptr`). Additionally, `std` provides
24-
pervasive types (`option` and `result`), task creation and communication
25-
primitives (`task`, `comm`), platform abstractions (`os` and `path`), basic
26-
I/O abstractions (`io`), common traits (`kinds`, `ops`, `cmp`, `num`,
27-
`to_str`), and complete bindings to the C standard library (`libc`).
15+
The Rust standard library is a group of interrelated modules defining
16+
the core language traits, operations on built-in data types, collections,
17+
platform abstractions, the task scheduler, runtime support for language
18+
features and other common functionality.
19+
20+
`std` includes modules corresponding to each of the integer types,
21+
each of the floating point types, the `bool` type, tuples, characters,
22+
strings (`str`), vectors (`vec`), managed boxes (`managed`), owned
23+
boxes (`owned`), and unsafe and borrowed pointers (`ptr`, `borrowed`).
24+
Additionally, `std` provides pervasive types (`option` and `result`),
25+
task creation and communication primitives (`task`, `comm`), platform
26+
abstractions (`os` and `path`), basic I/O abstractions (`io`), common
27+
traits (`kinds`, `ops`, `cmp`, `num`, `to_str`), and complete bindings
28+
to the C standard library (`libc`).
2829

2930
# Standard library injection and the Rust prelude
3031

@@ -38,7 +39,7 @@ with the `std::` path prefix, as in `use std::vec`, `use std::task::spawn`,
3839
etc.
3940

4041
Additionally, `std` contains a `prelude` module that reexports many of the
41-
most common std modules, types and traits. The contents of the prelude are
42+
most common types, traits and functions. The contents of the prelude are
4243
imported into every *module* by default. Implicitly, all modules behave as if
4344
they contained the following prologue:
4445

@@ -66,7 +67,7 @@ they contained the following prologue:
6667
#[deny(non_camel_case_types)];
6768
#[deny(missing_doc)];
6869

69-
// Make core testable by not duplicating lang items. See #2912
70+
// Make std testable by not duplicating lang items. See #2912
7071
#[cfg(test)] extern mod realstd(name = "std");
7172
#[cfg(test)] pub use kinds = realstd::kinds;
7273
#[cfg(test)] pub use ops = realstd::ops;

src/libstd/libc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* This module contains bindings to the C standard library,
1515
* organized into modules by their defining standard.
1616
* Additionally, it contains some assorted platform-specific definitions.
17-
* For convenience, most functions and types are reexported from `core::libc`,
18-
* so `pub use core::libc::*` will import the available
17+
* For convenience, most functions and types are reexported from `std::libc`,
18+
* so `pub use std::libc::*` will import the available
1919
* C bindings as appropriate for the target platform. The exact
2020
* set of functions available are platform specific.
2121
*

0 commit comments

Comments
 (0)