Skip to content

Commit 6b025c8

Browse files
committed
auto merge of #12272 : alexcrichton/rust/snapshot, r=kballard
This notably contains the `extern mod` => `extern crate` change. Closes #9880
2 parents 4af28c9 + a41b0c2 commit 6b025c8

File tree

444 files changed

+694
-718
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

444 files changed

+694
-718
lines changed

src/compiletest/compiletest.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#[allow(non_camel_case_types)];
1414
#[deny(warnings)];
1515

16-
extern mod extra;
17-
extern mod getopts;
16+
extern crate extra;
17+
extern crate getopts;
1818

1919
use std::os;
2020
use std::io;

src/doc/favicon.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico" />
1+
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico" />

src/doc/guide-runtime.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ fn main() {}
232232
Whereas this program explicitly opts into using a particular runtime
233233

234234
~~~{.rust}
235-
extern mod green;
235+
extern crate green;
236236
237237
#[start]
238238
fn start(argc: int, argv: **u8) -> int {

src/doc/guide-tasks.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ later.
285285
The basic example below illustrates this.
286286

287287
~~~
288-
# extern mod sync;
288+
# extern crate sync;
289289
290290
# fn main() {
291291
# fn make_a_sandwich() {};
@@ -310,7 +310,7 @@ Here is another example showing how futures allow you to background computations
310310
be distributed on the available cores.
311311

312312
~~~
313-
# extern mod sync;
313+
# extern crate sync;
314314
# use std::vec;
315315
fn partial_sum(start: uint) -> f64 {
316316
let mut local_sum = 0f64;
@@ -346,7 +346,7 @@ Here is a small example showing how to use Arcs. We wish to run concurrently sev
346346
a single large vector of floats. Each task needs the full vector to perform its duty.
347347

348348
~~~
349-
# extern mod sync;
349+
# extern crate sync;
350350
# use std::vec;
351351
# use std::rand;
352352
use sync::Arc;
@@ -379,7 +379,7 @@ at the power given as argument and takes the inverse power of this value). The A
379379
created by the line
380380

381381
~~~
382-
# extern mod sync;
382+
# extern crate sync;
383383
# use sync::Arc;
384384
# use std::vec;
385385
# use std::rand;
@@ -392,7 +392,7 @@ let numbers_arc=Arc::new(numbers);
392392
and a clone of it is sent to each task
393393

394394
~~~
395-
# extern mod sync;
395+
# extern crate sync;
396396
# use sync::Arc;
397397
# use std::vec;
398398
# use std::rand;
@@ -409,7 +409,7 @@ copying only the wrapper and not its contents.
409409
Each task recovers the underlying data by
410410

411411
~~~
412-
# extern mod sync;
412+
# extern crate sync;
413413
# use sync::Arc;
414414
# use std::vec;
415415
# use std::rand;
@@ -499,7 +499,7 @@ the string in response. The child terminates when it receives `0`.
499499
Here is the function that implements the child task:
500500

501501
~~~
502-
# extern mod sync;
502+
# extern crate sync;
503503
# fn main() {
504504
# use sync::DuplexStream;
505505
fn stringifier(channel: &DuplexStream<~str, uint>) {
@@ -524,7 +524,7 @@ response itself is simply the stringified version of the received value,
524524
Here is the code for the parent task:
525525
526526
~~~
527-
# extern mod sync;
527+
# extern crate sync;
528528
# use std::task::spawn;
529529
# use sync::DuplexStream;
530530
# fn stringifier(channel: &DuplexStream<~str, uint>) {

src/doc/guide-testing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ amount.
185185
For example:
186186

187187
~~~
188-
extern mod extra;
188+
extern crate extra;
189189
use std::vec;
190190
use extra::test::BenchHarness;
191191
@@ -243,7 +243,7 @@ recognize that some calculation has no external effects and remove
243243
it entirely.
244244

245245
~~~
246-
extern mod extra;
246+
extern crate extra;
247247
use extra::test::BenchHarness;
248248
249249
#[bench]

src/doc/po/ja/complement-cheatsheet.md.po

+2-2
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ msgstr "## タプル"
273273
#. type: Plain text
274274
#: src/doc/complement-cheatsheet.md:122
275275
#, fuzzy, no-wrap
276-
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
276+
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
277277
msgid ""
278278
"~~~\n"
279279
"struct Foo {\n"
@@ -282,7 +282,7 @@ msgid ""
282282
msgstr ""
283283
"~~~~ {.ignore}\n"
284284
"// main.rs\n"
285-
"extern mod world;\n"
285+
"extern crate world;\n"
286286
"fn main() { println(~\"hello \" + world::explore()); }\n"
287287
"~~~~"
288288

src/doc/po/ja/guide-conditions.md.po

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ msgstr "# 関数"
7979
#: src/doc/guide-conditions.md:262
8080
#, fuzzy
8181
#| msgid ""
82-
#| "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello "
82+
#| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
8383
#| "\" + world::explore()); } ~~~~"
8484
msgid "fn main() {"
8585
msgstr ""
8686
"~~~~ {.ignore}\n"
8787
"// main.rs\n"
88-
"extern mod world;\n"
88+
"extern crate world;\n"
8989
"fn main() { println(~\"hello \" + world::explore()); }\n"
9090
"~~~~"
9191

src/doc/po/ja/guide-container.md.po

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ msgstr "# イントロダクション"
7474
#. type: Plain text
7575
#: src/doc/guide-container.md:85
7676
#, fuzzy, no-wrap
77-
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
77+
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
7878
msgid ""
7979
"impl Iterator<int> for ZeroStream {\n"
8080
" fn next(&mut self) -> Option<int> {\n"
@@ -85,7 +85,7 @@ msgid ""
8585
msgstr ""
8686
"~~~~ {.ignore}\n"
8787
"// main.rs\n"
88-
"extern mod world;\n"
88+
"extern crate world;\n"
8989
"fn main() { println(~\"hello \" + world::explore()); }\n"
9090
"~~~~"
9191

src/doc/po/ja/guide-ffi.md.po

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ msgstr "## 最小限の例"
7070
#. type: Plain text
7171
#: src/doc/guide-ffi.md:323
7272
#, fuzzy, no-wrap
73-
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
73+
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
7474
msgid ""
7575
"struct RustObject {\n"
7676
" a: i32,\n"
@@ -79,7 +79,7 @@ msgid ""
7979
msgstr ""
8080
"~~~~ {.ignore}\n"
8181
"// main.rs\n"
82-
"extern mod world;\n"
82+
"extern crate world;\n"
8383
"fn main() { println(~\"hello \" + world::explore()); }\n"
8484
"~~~~"
8585

src/doc/po/ja/guide-pointers.md.po

+16-16
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ msgstr ""
154154
#: src/doc/guide-pointers.md:141 src/doc/guide-pointers.md:221
155155
#: src/doc/guide-pointers.md:238 src/doc/guide-pointers.md:300
156156
#, fuzzy, no-wrap
157-
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
157+
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
158158
msgid ""
159159
"~~~rust\n"
160160
"struct Point {\n"
@@ -164,7 +164,7 @@ msgid ""
164164
msgstr ""
165165
"~~~~ {.ignore}\n"
166166
"// main.rs\n"
167-
"extern mod world;\n"
167+
"extern crate world;\n"
168168
"fn main() { println(~\"hello \" + world::explore()); }\n"
169169
"~~~~"
170170

@@ -222,7 +222,7 @@ msgstr "# データ構造"
222222
#. type: Plain text
223223
#: src/doc/guide-pointers.md:189
224224
#, fuzzy, no-wrap
225-
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
225+
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
226226
msgid ""
227227
"~~~rust\n"
228228
"enum List<T> {\n"
@@ -232,7 +232,7 @@ msgid ""
232232
msgstr ""
233233
"~~~~ {.ignore}\n"
234234
"// main.rs\n"
235-
"extern mod world;\n"
235+
"extern crate world;\n"
236236
"fn main() { println(~\"hello \" + world::explore()); }\n"
237237
"~~~~"
238238

@@ -304,7 +304,7 @@ msgstr "## マネージドボックス"
304304
#. type: Plain text
305305
#: src/doc/guide-pointers.md:269
306306
#, fuzzy, no-wrap
307-
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
307+
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
308308
msgid ""
309309
"~~~rust{.ignore}\n"
310310
"struct Point {\n"
@@ -314,7 +314,7 @@ msgid ""
314314
msgstr ""
315315
"~~~~ {.ignore}\n"
316316
"// main.rs\n"
317-
"extern mod world;\n"
317+
"extern crate world;\n"
318318
"fn main() { println(~\"hello \" + world::explore()); }\n"
319319
"~~~~"
320320

@@ -372,7 +372,7 @@ msgstr ""
372372
#. type: Plain text
373373
#: src/doc/guide-pointers.md:341
374374
#, fuzzy, no-wrap
375-
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
375+
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
376376
msgid ""
377377
"struct Point {\n"
378378
" x: f32,\n"
@@ -381,7 +381,7 @@ msgid ""
381381
msgstr ""
382382
"~~~~ {.ignore}\n"
383383
"// main.rs\n"
384-
"extern mod world;\n"
384+
"extern crate world;\n"
385385
"fn main() { println(~\"hello \" + world::explore()); }\n"
386386
"~~~~"
387387

@@ -402,7 +402,7 @@ msgstr ""
402402
#. type: Plain text
403403
#: src/doc/guide-pointers.md:378
404404
#, fuzzy, no-wrap
405-
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
405+
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
406406
msgid ""
407407
"~~~rust{.ignore}\n"
408408
"fn main() {\n"
@@ -413,7 +413,7 @@ msgid ""
413413
msgstr ""
414414
"~~~~ {.ignore}\n"
415415
"// main.rs\n"
416-
"extern mod world;\n"
416+
"extern crate world;\n"
417417
"fn main() { println(~\"hello \" + world::explore()); }\n"
418418
"~~~~"
419419

@@ -499,7 +499,7 @@ msgstr ""
499499
#. type: Plain text
500500
#: src/doc/guide-pointers.md:450
501501
#, fuzzy, no-wrap
502-
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
502+
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
503503
msgid ""
504504
"fn main() {\n"
505505
" let x = ~5;\n"
@@ -509,7 +509,7 @@ msgid ""
509509
msgstr ""
510510
"~~~~ {.ignore}\n"
511511
"// main.rs\n"
512-
"extern mod world;\n"
512+
"extern crate world;\n"
513513
"fn main() { println(~\"hello \" + world::explore()); }\n"
514514
"~~~~"
515515

@@ -530,7 +530,7 @@ msgstr ""
530530
#. type: Plain text
531531
#: src/doc/guide-pointers.md:463
532532
#, fuzzy, no-wrap
533-
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
533+
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
534534
msgid ""
535535
"fn main() {\n"
536536
" let x = ~5;\n"
@@ -540,14 +540,14 @@ msgid ""
540540
msgstr ""
541541
"~~~~ {.ignore}\n"
542542
"// main.rs\n"
543-
"extern mod world;\n"
543+
"extern crate world;\n"
544544
"fn main() { println(~\"hello \" + world::explore()); }\n"
545545
"~~~~"
546546

547547
#. type: Plain text
548548
#: src/doc/guide-pointers.md:477
549549
#, fuzzy, no-wrap
550-
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
550+
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
551551
msgid ""
552552
"fn main() {\n"
553553
" let x = ~5;\n"
@@ -557,7 +557,7 @@ msgid ""
557557
msgstr ""
558558
"~~~~ {.ignore}\n"
559559
"// main.rs\n"
560-
"extern mod world;\n"
560+
"extern crate world;\n"
561561
"fn main() { println(~\"hello \" + world::explore()); }\n"
562562
"~~~~"
563563

src/doc/po/ja/guide-runtime.md.po

+5-5
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,21 @@ msgstr "## 他のクレートの利用"
8383
#: src/doc/guide-runtime.md:231
8484
#, fuzzy
8585
#| msgid ""
86-
#| "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello "
86+
#| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
8787
#| "\" + world::explore()); } ~~~~"
8888
msgid "~~~{.rust} fn main() {} ~~~"
8989
msgstr ""
9090
"~~~~ {.ignore}\n"
9191
"// main.rs\n"
92-
"extern mod world;\n"
92+
"extern crate world;\n"
9393
"fn main() { println(~\"hello \" + world::explore()); }\n"
9494
"~~~~"
9595

9696
#. type: Plain text
9797
#: src/doc/guide-runtime.md:236
9898
#, fuzzy
9999
#| msgid "~~~~ {.ignore} let foo = 10;"
100-
msgid "~~~{.rust} extern mod green;"
100+
msgid "~~~{.rust} extern crate green;"
101101
msgstr ""
102102
"~~~~ {.ignore}\n"
103103
"let foo = 10;"
@@ -106,13 +106,13 @@ msgstr ""
106106
#: src/doc/guide-runtime.md:246
107107
#, fuzzy
108108
#| msgid ""
109-
#| "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello "
109+
#| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
110110
#| "\" + world::explore()); } ~~~~"
111111
msgid "fn main() {} ~~~"
112112
msgstr ""
113113
"~~~~ {.ignore}\n"
114114
"// main.rs\n"
115-
"extern mod world;\n"
115+
"extern crate world;\n"
116116
"fn main() { println(~\"hello \" + world::explore()); }\n"
117117
"~~~~"
118118

src/doc/po/ja/guide-testing.md.po

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ msgstr "## 最小限の例"
6161
#: src/doc/guide-testing.md:131
6262
#, fuzzy
6363
#| msgid "~~~~ use std::task::spawn;"
64-
msgid "~~~ extern mod extra; use std::vec;"
64+
msgid "~~~ extern crate extra; use std::vec;"
6565
msgstr ""
6666
"~~~~\n"
6767
"use std::task::spawn;"

0 commit comments

Comments
 (0)