Skip to content

Commit cc4fabc

Browse files
committed
Fix some std/extra language in the tutorial
1 parent 21c3cf0 commit cc4fabc

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

doc/tutorial.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,6 @@ This code creates a closure that adds a given string to its argument,
14801480
returns it from a function, and then calls it:
14811481

14821482
~~~~
1483-
# extern mod std;
14841483
fn mk_appender(suffix: ~str) -> @fn(~str) -> ~str {
14851484
// The compiler knows that we intend this closure to be of type @fn
14861485
return |s| s + suffix;
@@ -2292,7 +2291,7 @@ let nonsense = mycircle.radius() * mycircle.area();
22922291
22932292
## Deriving implementations for traits
22942293

2295-
A small number of traits in `std` and `std` can have implementations
2294+
A small number of traits in `std` and `extra` can have implementations
22962295
that can be automatically derived. These instances are specified by
22972296
placing the `deriving` attribute on a data type declaration. For
22982297
example, the following will mean that `Circle` has an implementation
@@ -2541,9 +2540,9 @@ as well as an inscrutable string of alphanumerics. These are both
25412540
part of Rust's library versioning scheme. The alphanumerics are
25422541
a hash representing the crate metadata.
25432542

2544-
## The std library
2543+
## The standard library
25452544

2546-
The Rust std library provides runtime features required by the language,
2545+
The Rust standard library provides runtime features required by the language,
25472546
including the task scheduler and memory allocators, as well as library
25482547
support for Rust built-in types, platform abstractions, and other commonly
25492548
used features.
@@ -2559,7 +2558,7 @@ I/O abstractions ([`io`]), [containers] like [`hashmap`],
25592558
common traits ([`kinds`], [`ops`], [`cmp`], [`num`],
25602559
[`to_str`], [`clone`]), and complete bindings to the C standard library ([`libc`]).
25612560

2562-
### Core injection and the Rust prelude
2561+
### Standard Library injection and the Rust prelude
25632562

25642563
`std` is imported at the topmost level of every crate by default, as
25652564
if the first line of each crate was
@@ -2571,7 +2570,7 @@ with the `std::` path prefix, as in `use std::vec`, `use std::task::spawn`,
25712570
etc.
25722571

25732572
Additionally, `std` contains a `prelude` module that reexports many of the
2574-
most common std modules, types and traits. The contents of the prelude are
2573+
most common standard modules, types and traits. The contents of the prelude are
25752574
imported into every *module* by default. Implicitly, all modules behave as if
25762575
they contained the following prologue:
25772576

0 commit comments

Comments
 (0)