Skip to content

Commit 0e8f2f1

Browse files
committed
---
yaml --- r: 30351 b: refs/heads/incoming c: 9097410 h: refs/heads/master i: 30349: adcf032 30347: 887408c 30343: 0043b97 30335: 145ca46 v: v3
1 parent 69cdc58 commit 0e8f2f1

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: 0ddae5ec7dc2c1a4237bb091e52fff5940f18b48
9+
refs/heads/incoming: 9097410b433c0d7c7dca8f9296161b3074a8d21e
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/doc/tutorial.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ This code creates a closure that adds a given string to its argument,
13301330
returns it from a function, and then calls it:
13311331

13321332
~~~~
1333-
use std;
1333+
extern mod std;
13341334
13351335
fn mk_appender(suffix: ~str) -> fn@(~str) -> ~str {
13361336
return fn@(s: ~str) -> ~str { s + suffix };
@@ -1680,9 +1680,10 @@ content to the `poultry` module itself.
16801680

16811681
## Using other crates
16821682

1683-
Having compiled a crate that contains the `#[crate_type = "lib"]` attribute,
1684-
you can use it in another crate with a `use` directive. We've already seen
1685-
`use std` in several of the examples, which loads in the [standard library][std].
1683+
Having compiled a crate that contains the `#[crate_type = "lib"]`
1684+
attribute, you can use it in another crate with a `use`
1685+
directive. We've already seen `extern mod std` in several of the
1686+
examples, which loads in the [standard library][std].
16861687

16871688
[std]: http://doc.rust-lang.org/doc/std/index/General.html
16881689

@@ -1738,7 +1739,7 @@ fn world() -> ~str { ~"world" }
17381739

17391740
~~~~ {.ignore}
17401741
// main.rs
1741-
use std;
1742+
extern mod std;
17421743
use mylib;
17431744
fn main() { io::println(~"hello " + mylib::world()); }
17441745
~~~~
@@ -2254,7 +2255,7 @@ Tests can be interspersed with other code, and annotated with the
22542255
~~~~{.xfail-test}
22552256
# // FIXME: xfailed because test_twice is a #[test] function it's not
22562257
# // getting compiled
2257-
use std;
2258+
extern mod std;
22582259
22592260
fn twice(x: int) -> int { x + x }
22602261
@@ -2302,7 +2303,7 @@ To indicate that a test is supposed to fail instead of pass, you can
23022303
give it a `#[should_fail]` attribute.
23032304

23042305
~~~~
2305-
use std;
2306+
extern mod std;
23062307
23072308
fn divide(a: float, b: float) -> float {
23082309
if b == 0f { fail; }

branches/incoming/src/etc/extract-tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
if not ignore:
5252
if not re.search(r"\bfn main\b", block):
5353
block = "fn main() {\n" + block + "\n}\n"
54-
if not re.search(r"\buse std\b", block):
55-
block = "use std;\n" + block;
54+
if not re.search(r"\bextern mod std\b", block):
55+
block = "extern mod std;\n" + block;
5656
if xfail:
5757
block = "// xfail-test\n" + block
5858
filename = (dest + "/" + str(chapter)

0 commit comments

Comments
 (0)