diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2014-02-09 21:58:28 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2014-02-11 10:39:15 +0100 |
| commit | d2d1129ad071653e32709706bb16606506ca227a (patch) | |
| tree | af2061f7093e22a7f4bbb4717d1c13192ba1c741 /src/doc/tutorial.md | |
| parent | 3794d681b3479224917c0efb7a769c2583a4ee0e (diff) | |
| download | rust-d2d1129ad071653e32709706bb16606506ca227a.tar.gz rust-d2d1129ad071653e32709706bb16606506ca227a.zip | |
Factoring bigint, rational, and complex out of libextra into libnum.
Removed use of globs present in earlier versions of modules. Fix tutorial.md to reflect `extra::rational` ==> `num::rational`.
Diffstat (limited to 'src/doc/tutorial.md')
| -rw-r--r-- | src/doc/tutorial.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md index 73fec54fbcb..f94aa5b9104 100644 --- a/src/doc/tutorial.md +++ b/src/doc/tutorial.md @@ -3026,12 +3026,12 @@ In Rust terminology, we need a way to refer to other crates. For that, Rust offers you the `extern mod` declaration: ~~~ -extern mod extra; -// extra ships with Rust, you'll find more details further down. +extern mod num; +// `num` ships with Rust (much like `extra`; more details further down). fn main() { // The rational number '1/2': - let one_half = ::extra::rational::Ratio::new(1, 2); + let one_half = ::num::rational::Ratio::new(1, 2); } ~~~ @@ -3056,10 +3056,10 @@ of both `use` and local declarations. Which can result in something like this: ~~~ -extern mod extra; +extern mod num; use farm::dog; -use extra::rational::Ratio; +use num::rational::Ratio; mod farm { pub fn dog() { println!("woof"); } @@ -3224,9 +3224,9 @@ See the [API documentation][stddoc] for details. ## The extra library -Rust also ships with the [extra library], an accumulation of useful things, +Rust ships with crates such as the [extra library], an accumulation of useful things, that are however not important enough to deserve a place in the standard -library. You can use them by linking to `extra` with an `extern mod extra;`. +library. You can link to a library such as `extra` with an `extern mod extra;`. [extra library]: extra/index.html |
