extern mod => extern crate
This was previously implemented, and it just needed a snapshot to go through
This commit is contained in:
parent
359ac360a4
commit
a41b0c2529
438 changed files with 682 additions and 685 deletions
|
@ -13,8 +13,8 @@
|
||||||
#[allow(non_camel_case_types)];
|
#[allow(non_camel_case_types)];
|
||||||
#[deny(warnings)];
|
#[deny(warnings)];
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
extern mod getopts;
|
extern crate getopts;
|
||||||
|
|
||||||
use std::os;
|
use std::os;
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
|
@ -232,7 +232,7 @@ fn main() {}
|
||||||
Whereas this program explicitly opts into using a particular runtime
|
Whereas this program explicitly opts into using a particular runtime
|
||||||
|
|
||||||
~~~{.rust}
|
~~~{.rust}
|
||||||
extern mod green;
|
extern crate green;
|
||||||
|
|
||||||
#[start]
|
#[start]
|
||||||
fn start(argc: int, argv: **u8) -> int {
|
fn start(argc: int, argv: **u8) -> int {
|
||||||
|
|
|
@ -285,7 +285,7 @@ later.
|
||||||
The basic example below illustrates this.
|
The basic example below illustrates this.
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
# extern mod sync;
|
# extern crate sync;
|
||||||
|
|
||||||
# fn main() {
|
# fn main() {
|
||||||
# fn make_a_sandwich() {};
|
# fn make_a_sandwich() {};
|
||||||
|
@ -310,7 +310,7 @@ Here is another example showing how futures allow you to background computations
|
||||||
be distributed on the available cores.
|
be distributed on the available cores.
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
# extern mod sync;
|
# extern crate sync;
|
||||||
# use std::vec;
|
# use std::vec;
|
||||||
fn partial_sum(start: uint) -> f64 {
|
fn partial_sum(start: uint) -> f64 {
|
||||||
let mut local_sum = 0f64;
|
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
|
||||||
a single large vector of floats. Each task needs the full vector to perform its duty.
|
a single large vector of floats. Each task needs the full vector to perform its duty.
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
# extern mod sync;
|
# extern crate sync;
|
||||||
# use std::vec;
|
# use std::vec;
|
||||||
# use std::rand;
|
# use std::rand;
|
||||||
use sync::Arc;
|
use sync::Arc;
|
||||||
|
@ -379,7 +379,7 @@ at the power given as argument and takes the inverse power of this value). The A
|
||||||
created by the line
|
created by the line
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
# extern mod sync;
|
# extern crate sync;
|
||||||
# use sync::Arc;
|
# use sync::Arc;
|
||||||
# use std::vec;
|
# use std::vec;
|
||||||
# use std::rand;
|
# use std::rand;
|
||||||
|
@ -392,7 +392,7 @@ let numbers_arc=Arc::new(numbers);
|
||||||
and a clone of it is sent to each task
|
and a clone of it is sent to each task
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
# extern mod sync;
|
# extern crate sync;
|
||||||
# use sync::Arc;
|
# use sync::Arc;
|
||||||
# use std::vec;
|
# use std::vec;
|
||||||
# use std::rand;
|
# use std::rand;
|
||||||
|
@ -409,7 +409,7 @@ copying only the wrapper and not its contents.
|
||||||
Each task recovers the underlying data by
|
Each task recovers the underlying data by
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
# extern mod sync;
|
# extern crate sync;
|
||||||
# use sync::Arc;
|
# use sync::Arc;
|
||||||
# use std::vec;
|
# use std::vec;
|
||||||
# use std::rand;
|
# use std::rand;
|
||||||
|
@ -499,7 +499,7 @@ the string in response. The child terminates when it receives `0`.
|
||||||
Here is the function that implements the child task:
|
Here is the function that implements the child task:
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
# extern mod sync;
|
# extern crate sync;
|
||||||
# fn main() {
|
# fn main() {
|
||||||
# use sync::DuplexStream;
|
# use sync::DuplexStream;
|
||||||
fn stringifier(channel: &DuplexStream<~str, uint>) {
|
fn stringifier(channel: &DuplexStream<~str, uint>) {
|
||||||
|
@ -524,7 +524,7 @@ response itself is simply the stringified version of the received value,
|
||||||
Here is the code for the parent task:
|
Here is the code for the parent task:
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
# extern mod sync;
|
# extern crate sync;
|
||||||
# use std::task::spawn;
|
# use std::task::spawn;
|
||||||
# use sync::DuplexStream;
|
# use sync::DuplexStream;
|
||||||
# fn stringifier(channel: &DuplexStream<~str, uint>) {
|
# fn stringifier(channel: &DuplexStream<~str, uint>) {
|
||||||
|
|
|
@ -185,7 +185,7 @@ amount.
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
use std::vec;
|
use std::vec;
|
||||||
use extra::test::BenchHarness;
|
use extra::test::BenchHarness;
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ recognize that some calculation has no external effects and remove
|
||||||
it entirely.
|
it entirely.
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
use extra::test::BenchHarness;
|
use extra::test::BenchHarness;
|
||||||
|
|
||||||
#[bench]
|
#[bench]
|
||||||
|
|
|
@ -273,7 +273,7 @@ msgstr "## タプル"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/complement-cheatsheet.md:122
|
#: src/doc/complement-cheatsheet.md:122
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~\n"
|
"~~~\n"
|
||||||
"struct Foo {\n"
|
"struct Foo {\n"
|
||||||
|
@ -282,7 +282,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
|
|
@ -79,13 +79,13 @@ msgstr "# 関数"
|
||||||
#: src/doc/guide-conditions.md:262
|
#: src/doc/guide-conditions.md:262
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid ""
|
#| msgid ""
|
||||||
#| "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello "
|
#| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
|
||||||
#| "\" + world::explore()); } ~~~~"
|
#| "\" + world::explore()); } ~~~~"
|
||||||
msgid "fn main() {"
|
msgid "fn main() {"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ msgstr "# イントロダクション"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/guide-container.md:85
|
#: src/doc/guide-container.md:85
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"impl Iterator<int> for ZeroStream {\n"
|
"impl Iterator<int> for ZeroStream {\n"
|
||||||
" fn next(&mut self) -> Option<int> {\n"
|
" fn next(&mut self) -> Option<int> {\n"
|
||||||
|
@ -85,7 +85,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ msgstr "## 最小限の例"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/guide-ffi.md:323
|
#: src/doc/guide-ffi.md:323
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"struct RustObject {\n"
|
"struct RustObject {\n"
|
||||||
" a: i32,\n"
|
" a: i32,\n"
|
||||||
|
@ -79,7 +79,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ msgstr ""
|
||||||
#: src/doc/guide-pointers.md:141 src/doc/guide-pointers.md:221
|
#: src/doc/guide-pointers.md:141 src/doc/guide-pointers.md:221
|
||||||
#: src/doc/guide-pointers.md:238 src/doc/guide-pointers.md:300
|
#: src/doc/guide-pointers.md:238 src/doc/guide-pointers.md:300
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~rust\n"
|
"~~~rust\n"
|
||||||
"struct Point {\n"
|
"struct Point {\n"
|
||||||
|
@ -164,7 +164,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ msgstr "# データ構造"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/guide-pointers.md:189
|
#: src/doc/guide-pointers.md:189
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~rust\n"
|
"~~~rust\n"
|
||||||
"enum List<T> {\n"
|
"enum List<T> {\n"
|
||||||
|
@ -232,7 +232,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ msgstr "## マネージドボックス"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/guide-pointers.md:269
|
#: src/doc/guide-pointers.md:269
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~rust{.ignore}\n"
|
"~~~rust{.ignore}\n"
|
||||||
"struct Point {\n"
|
"struct Point {\n"
|
||||||
|
@ -314,7 +314,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ msgstr ""
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/guide-pointers.md:341
|
#: src/doc/guide-pointers.md:341
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"struct Point {\n"
|
"struct Point {\n"
|
||||||
" x: f32,\n"
|
" x: f32,\n"
|
||||||
|
@ -381,7 +381,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ msgstr ""
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/guide-pointers.md:378
|
#: src/doc/guide-pointers.md:378
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~rust{.ignore}\n"
|
"~~~rust{.ignore}\n"
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
|
@ -413,7 +413,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -499,7 +499,7 @@ msgstr ""
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/guide-pointers.md:450
|
#: src/doc/guide-pointers.md:450
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
" let x = ~5;\n"
|
" let x = ~5;\n"
|
||||||
|
@ -509,7 +509,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -530,7 +530,7 @@ msgstr ""
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/guide-pointers.md:463
|
#: src/doc/guide-pointers.md:463
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
" let x = ~5;\n"
|
" let x = ~5;\n"
|
||||||
|
@ -540,14 +540,14 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/guide-pointers.md:477
|
#: src/doc/guide-pointers.md:477
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
" let x = ~5;\n"
|
" let x = ~5;\n"
|
||||||
|
@ -557,7 +557,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
|
|
@ -83,13 +83,13 @@ msgstr "## 他のクレートの利用"
|
||||||
#: src/doc/guide-runtime.md:231
|
#: src/doc/guide-runtime.md:231
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid ""
|
#| msgid ""
|
||||||
#| "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello "
|
#| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
|
||||||
#| "\" + world::explore()); } ~~~~"
|
#| "\" + world::explore()); } ~~~~"
|
||||||
msgid "~~~{.rust} fn main() {} ~~~"
|
msgid "~~~{.rust} fn main() {} ~~~"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ msgstr ""
|
||||||
#: src/doc/guide-runtime.md:236
|
#: src/doc/guide-runtime.md:236
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "~~~~ {.ignore} let foo = 10;"
|
#| msgid "~~~~ {.ignore} let foo = 10;"
|
||||||
msgid "~~~{.rust} extern mod green;"
|
msgid "~~~{.rust} extern crate green;"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"let foo = 10;"
|
"let foo = 10;"
|
||||||
|
@ -106,13 +106,13 @@ msgstr ""
|
||||||
#: src/doc/guide-runtime.md:246
|
#: src/doc/guide-runtime.md:246
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid ""
|
#| msgid ""
|
||||||
#| "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello "
|
#| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
|
||||||
#| "\" + world::explore()); } ~~~~"
|
#| "\" + world::explore()); } ~~~~"
|
||||||
msgid "fn main() {} ~~~"
|
msgid "fn main() {} ~~~"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ msgstr "## 最小限の例"
|
||||||
#: src/doc/guide-testing.md:131
|
#: src/doc/guide-testing.md:131
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "~~~~ use std::task::spawn;"
|
#| msgid "~~~~ use std::task::spawn;"
|
||||||
msgid "~~~ extern mod extra; use std::vec;"
|
msgid "~~~ extern crate extra; use std::vec;"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~\n"
|
"~~~~\n"
|
||||||
"use std::task::spawn;"
|
"use std::task::spawn;"
|
||||||
|
|
|
@ -310,14 +310,14 @@ msgstr "## 他のクレートの利用"
|
||||||
#: src/doc/rust.md:786
|
#: src/doc/rust.md:786
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "## Using other crates"
|
#| msgid "## Using other crates"
|
||||||
msgid "Four examples of `extern mod` declarations:"
|
msgid "Four examples of `extern crate` declarations:"
|
||||||
msgstr "## 他のクレートの利用"
|
msgstr "## 他のクレートの利用"
|
||||||
|
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/rust.md:789
|
#: src/doc/rust.md:789
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "~~~~ {.ignore} let foo = 10;"
|
#| msgid "~~~~ {.ignore} let foo = 10;"
|
||||||
msgid "~~~~ {.ignore} extern mod pcre;"
|
msgid "~~~~ {.ignore} extern crate pcre;"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"let foo = 10;"
|
"let foo = 10;"
|
||||||
|
@ -365,7 +365,7 @@ msgstr "## 最小限の例"
|
||||||
#| msgid "~~~~ {.ignore} let foo = 10;"
|
#| msgid "~~~~ {.ignore} let foo = 10;"
|
||||||
msgid ""
|
msgid ""
|
||||||
"mod foo {\n"
|
"mod foo {\n"
|
||||||
" extern mod extra;\n"
|
" extern crate extra;\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"let foo = 10;"
|
"let foo = 10;"
|
||||||
|
@ -374,13 +374,13 @@ msgstr ""
|
||||||
#: src/doc/rust.md:901
|
#: src/doc/rust.md:901
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid ""
|
#| msgid ""
|
||||||
#| "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello "
|
#| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
|
||||||
#| "\" + world::explore()); } ~~~~"
|
#| "\" + world::explore()); } ~~~~"
|
||||||
msgid "fn main() {} ~~~~"
|
msgid "fn main() {} ~~~~"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -751,7 +751,7 @@ msgstr "# イントロダクション"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/rust.md:1420
|
#: src/doc/rust.md:1420
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"struct Circle {\n"
|
"struct Circle {\n"
|
||||||
" radius: f64,\n"
|
" radius: f64,\n"
|
||||||
|
@ -760,7 +760,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -775,13 +775,13 @@ msgstr "## 本書の表記について"
|
||||||
#: src/doc/rust.md:1644 src/doc/rust.md:1665
|
#: src/doc/rust.md:1644 src/doc/rust.md:1665
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid ""
|
#| msgid ""
|
||||||
#| "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello "
|
#| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
|
||||||
#| "\" + world::explore()); } ~~~~"
|
#| "\" + world::explore()); } ~~~~"
|
||||||
msgid "# fn main() {} ~~~~"
|
msgid "# fn main() {} ~~~~"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -866,7 +866,7 @@ msgstr "## 凍結"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/rust.md:1953
|
#: src/doc/rust.md:1953
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~~\n"
|
"~~~~\n"
|
||||||
"#[deriving(Eq, Clone)]\n"
|
"#[deriving(Eq, Clone)]\n"
|
||||||
|
@ -878,7 +878,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -1254,7 +1254,7 @@ msgstr ""
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/rust.md:2702
|
#: src/doc/rust.md:2702
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"while i < 10 {\n"
|
"while i < 10 {\n"
|
||||||
" println!(\"hello\");\n"
|
" println!(\"hello\");\n"
|
||||||
|
@ -1264,7 +1264,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -1306,7 +1306,7 @@ msgstr "## 最小限の例"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/rust.md:2774
|
#: src/doc/rust.md:2774
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"for e in v.iter() {\n"
|
"for e in v.iter() {\n"
|
||||||
" bar(*e);\n"
|
" bar(*e);\n"
|
||||||
|
@ -1315,7 +1315,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -1637,7 +1637,7 @@ msgstr "## 最小限の例"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/rust.md:3314
|
#: src/doc/rust.md:3314
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~~\n"
|
"~~~~\n"
|
||||||
"trait Printable {\n"
|
"trait Printable {\n"
|
||||||
|
@ -1646,14 +1646,14 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/rust.md:3318
|
#: src/doc/rust.md:3318
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"impl Printable for int {\n"
|
"impl Printable for int {\n"
|
||||||
" fn to_string(&self) -> ~str { self.to_str() }\n"
|
" fn to_string(&self) -> ~str { self.to_str() }\n"
|
||||||
|
@ -1661,14 +1661,14 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/rust.md:3327
|
#: src/doc/rust.md:3327
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
" print(@10 as @Printable);\n"
|
" print(@10 as @Printable);\n"
|
||||||
|
@ -1677,7 +1677,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -1698,7 +1698,7 @@ msgstr "# クロージャ"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/rust.md:3359
|
#: src/doc/rust.md:3359
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~~\n"
|
"~~~~\n"
|
||||||
"trait Printable {\n"
|
"trait Printable {\n"
|
||||||
|
@ -1707,14 +1707,14 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/rust.md:3366
|
#: src/doc/rust.md:3366
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"impl Printable for ~str {\n"
|
"impl Printable for ~str {\n"
|
||||||
" fn make_string(&self) -> ~str {\n"
|
" fn make_string(&self) -> ~str {\n"
|
||||||
|
@ -1725,7 +1725,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
|
|
@ -431,7 +431,7 @@ msgstr ""
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:136
|
#: src/doc/tutorial.md:136
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~~\n"
|
"~~~~\n"
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
|
@ -441,7 +441,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -634,7 +634,7 @@ msgstr ""
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:222
|
#: src/doc/tutorial.md:222
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"while count < 10 {\n"
|
"while count < 10 {\n"
|
||||||
" println!(\"count is {}\", count);\n"
|
" println!(\"count is {}\", count);\n"
|
||||||
|
@ -644,7 +644,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -1413,7 +1413,7 @@ msgstr ""
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:602
|
#: src/doc/tutorial.md:602
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~~\n"
|
"~~~~\n"
|
||||||
"struct Point {\n"
|
"struct Point {\n"
|
||||||
|
@ -1424,7 +1424,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -2187,7 +2187,7 @@ msgstr "# ボックス"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:986
|
#: src/doc/tutorial.md:986
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"struct Foo {\n"
|
"struct Foo {\n"
|
||||||
" a: u32,\n"
|
" a: u32,\n"
|
||||||
|
@ -2198,7 +2198,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -2312,7 +2312,7 @@ msgstr "例として、シンプルな構造体型の `Point` について考え
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:1376
|
#: src/doc/tutorial.md:1376
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~\n"
|
"~~~\n"
|
||||||
"struct Point {\n"
|
"struct Point {\n"
|
||||||
|
@ -2323,7 +2323,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -3688,7 +3688,7 @@ msgstr ""
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2110
|
#: src/doc/tutorial.md:2110
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~\n"
|
"~~~\n"
|
||||||
"struct TimeBomb {\n"
|
"struct TimeBomb {\n"
|
||||||
|
@ -3697,7 +3697,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -3735,7 +3735,7 @@ msgstr ""
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2135
|
#: src/doc/tutorial.md:2135
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~~\n"
|
"~~~~\n"
|
||||||
"trait Printable {\n"
|
"trait Printable {\n"
|
||||||
|
@ -3745,7 +3745,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -3774,7 +3774,7 @@ msgstr "[impls]: #メソッド"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2160 src/doc/tutorial.md:2206
|
#: src/doc/tutorial.md:2160 src/doc/tutorial.md:2206
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"impl Printable for ~str {\n"
|
"impl Printable for ~str {\n"
|
||||||
" fn print(&self) { println!(\"{}\", *self) }\n"
|
" fn print(&self) { println!(\"{}\", *self) }\n"
|
||||||
|
@ -3782,7 +3782,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -3821,7 +3821,7 @@ msgstr "## トレイトの実装の導出"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2185
|
#: src/doc/tutorial.md:2185
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"impl Printable for bool {\n"
|
"impl Printable for bool {\n"
|
||||||
" fn print(&self) { println!(\"{:?}\", *self) }\n"
|
" fn print(&self) { println!(\"{:?}\", *self) }\n"
|
||||||
|
@ -3829,7 +3829,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -3864,7 +3864,7 @@ msgstr "## タプル"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2235
|
#: src/doc/tutorial.md:2235
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~~\n"
|
"~~~~\n"
|
||||||
"trait Seq<T> {\n"
|
"trait Seq<T> {\n"
|
||||||
|
@ -3873,14 +3873,14 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2240
|
#: src/doc/tutorial.md:2240
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"impl<T> Seq<T> for ~[T] {\n"
|
"impl<T> Seq<T> for ~[T] {\n"
|
||||||
" fn length(&self) -> uint { self.len() }\n"
|
" fn length(&self) -> uint { self.len() }\n"
|
||||||
|
@ -3889,7 +3889,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -4447,7 +4447,7 @@ msgstr "## クレート"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2554
|
#: src/doc/tutorial.md:2554
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~~\n"
|
"~~~~\n"
|
||||||
"// `main.rs`\n"
|
"// `main.rs`\n"
|
||||||
|
@ -4458,7 +4458,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -4487,7 +4487,7 @@ msgstr "## 標準ライブラリ"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2587
|
#: src/doc/tutorial.md:2587
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
" println!(\"Hello farm!\");\n"
|
" println!(\"Hello farm!\");\n"
|
||||||
|
@ -4496,7 +4496,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -4510,21 +4510,21 @@ msgstr "## マネージドクロージャ"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2607
|
#: src/doc/tutorial.md:2607
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
" println!(\"Hello chicken!\");\n"
|
" println!(\"Hello chicken!\");\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2639
|
#: src/doc/tutorial.md:2639
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
" println!(\"Hello chicken!\");\n"
|
" println!(\"Hello chicken!\");\n"
|
||||||
|
@ -4534,7 +4534,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -4573,7 +4573,7 @@ msgstr "# モジュールとクレート"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2719
|
#: src/doc/tutorial.md:2719
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
" println!(\"Hello farm!\");\n"
|
" println!(\"Hello farm!\");\n"
|
||||||
|
@ -4583,7 +4583,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -4653,34 +4653,34 @@ msgstr ""
|
||||||
#: src/doc/tutorial.md:2897
|
#: src/doc/tutorial.md:2897
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid ""
|
#| msgid ""
|
||||||
#| "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello "
|
#| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
|
||||||
#| "\" + world::explore()); } ~~~~"
|
#| "\" + world::explore()); } ~~~~"
|
||||||
msgid "fn main() { cow() } ~~~"
|
msgid "fn main() { cow() } ~~~"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2916
|
#: src/doc/tutorial.md:2916
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
" println!(\"Hello farm!\");\n"
|
" println!(\"Hello farm!\");\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2923
|
#: src/doc/tutorial.md:2923
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
" // Can now refer to those names directly:\n"
|
" // Can now refer to those names directly:\n"
|
||||||
" chicken();\n"
|
" chicken();\n"
|
||||||
|
@ -4691,7 +4691,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -4699,7 +4699,7 @@ msgstr ""
|
||||||
#: src/doc/tutorial.md:2932
|
#: src/doc/tutorial.md:2932
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid ""
|
#| msgid ""
|
||||||
#| "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello "
|
#| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
|
||||||
#| "\" + world::explore()); } ~~~~"
|
#| "\" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~{.ignore} // `a.rs` - crate root use b::foo; mod b; fn main() { foo(); } "
|
"~~~{.ignore} // `a.rs` - crate root use b::foo; mod b; fn main() { foo(); } "
|
||||||
|
@ -4707,7 +4707,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -4715,21 +4715,21 @@ msgstr ""
|
||||||
#: src/doc/tutorial.md:2939
|
#: src/doc/tutorial.md:2939
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid ""
|
#| msgid ""
|
||||||
#| "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello "
|
#| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
|
||||||
#| "\" + world::explore()); } ~~~~"
|
#| "\" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~{.ignore} // `b.rs` use b::c::bar; pub mod c; pub fn foo() { bar(); } ~~~"
|
"~~~{.ignore} // `b.rs` use b::c::bar; pub mod c; pub fn foo() { bar(); } ~~~"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:2985
|
#: src/doc/tutorial.md:2985
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
" egg_layer();\n"
|
" egg_layer();\n"
|
||||||
|
@ -4738,7 +4738,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -4752,7 +4752,7 @@ msgstr "# ポインタのデリファレンス"
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:3014
|
#: src/doc/tutorial.md:3014
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
" farm::chicken();\n"
|
" farm::chicken();\n"
|
||||||
|
@ -4763,7 +4763,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -4778,13 +4778,13 @@ msgstr "## 他のクレートの利用"
|
||||||
#: src/doc/tutorial.md:3035
|
#: src/doc/tutorial.md:3035
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "## Using other crates"
|
#| msgid "## Using other crates"
|
||||||
msgid "For that, Rust offers you the `extern mod` declaration:"
|
msgid "For that, Rust offers you the `extern crate` declaration:"
|
||||||
msgstr "## 他のクレートの利用"
|
msgstr "## 他のクレートの利用"
|
||||||
|
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:3045
|
#: src/doc/tutorial.md:3045
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
" // The rational number '1/2':\n"
|
" // The rational number '1/2':\n"
|
||||||
|
@ -4794,7 +4794,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -4802,7 +4802,7 @@ msgstr ""
|
||||||
#: src/doc/tutorial.md:3068
|
#: src/doc/tutorial.md:3068
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "~~~~ {.ignore} let foo = 10;"
|
#| msgid "~~~~ {.ignore} let foo = 10;"
|
||||||
msgid "~~~ extern mod extra;"
|
msgid "~~~ extern crate extra;"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"let foo = 10;"
|
"let foo = 10;"
|
||||||
|
@ -4810,7 +4810,7 @@ msgstr ""
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
#: src/doc/tutorial.md:3081
|
#: src/doc/tutorial.md:3081
|
||||||
#, fuzzy, no-wrap
|
#, fuzzy, no-wrap
|
||||||
#| msgid "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
#| msgid "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello \" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"fn main() {\n"
|
"fn main() {\n"
|
||||||
" farm::dog();\n"
|
" farm::dog();\n"
|
||||||
|
@ -4820,7 +4820,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -4835,17 +4835,17 @@ msgstr "## 構造体"
|
||||||
#: src/doc/tutorial.md:3123
|
#: src/doc/tutorial.md:3123
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid ""
|
#| msgid ""
|
||||||
#| "~~~~ {.ignore} extern mod farm; extern mod my_farm (name = \"farm\", vers "
|
#| "~~~~ {.ignore} extern crate farm; extern crate my_farm (name = \"farm\", vers "
|
||||||
#| "= \"2.5\"); extern mod my_auxiliary_farm (name = \"farm\", author = \"mjh"
|
#| "= \"2.5\"); extern crate my_auxiliary_farm (name = \"farm\", author = \"mjh"
|
||||||
#| "\"); ~~~~"
|
#| "\"); ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~~ {.ignore} extern mod farm; extern mod farm = \"farm#2.5\"; extern mod "
|
"~~~~ {.ignore} extern crate farm; extern crate farm = \"farm#2.5\"; extern crate "
|
||||||
"my_farm = \"farm\"; ~~~~"
|
"my_farm = \"farm\"; ~~~~"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"extern mod farm;\n"
|
"extern crate farm;\n"
|
||||||
"extern mod my_farm (name = \"farm\", vers = \"2.5\");\n"
|
"extern crate my_farm (name = \"farm\", vers = \"2.5\");\n"
|
||||||
"extern mod my_auxiliary_farm (name = \"farm\", author = \"mjh\");\n"
|
"extern crate my_auxiliary_farm (name = \"farm\", author = \"mjh\");\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
#. type: Plain text
|
#. type: Plain text
|
||||||
|
@ -4891,7 +4891,7 @@ msgstr ""
|
||||||
#| "~~~~ // world.rs #[link(name = \"world\", vers = \"1.0\")]; pub fn "
|
#| "~~~~ // world.rs #[link(name = \"world\", vers = \"1.0\")]; pub fn "
|
||||||
#| "explore() -> &str { \"world\" } ~~~~"
|
#| "explore() -> &str { \"world\" } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~~ // `world.rs` #[crate_id = \"world#0.42\"]; # extern mod extra; pub fn "
|
"~~~~ // `world.rs` #[crate_id = \"world#0.42\"]; # extern crate extra; pub fn "
|
||||||
"explore() -> &'static str { \"world\" } # fn main() {} ~~~~"
|
"explore() -> &'static str { \"world\" } # fn main() {} ~~~~"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~\n"
|
"~~~~\n"
|
||||||
|
@ -4904,15 +4904,15 @@ msgstr ""
|
||||||
#: src/doc/tutorial.md:3159
|
#: src/doc/tutorial.md:3159
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid ""
|
#| msgid ""
|
||||||
#| "~~~~ {.ignore} // main.rs extern mod world; fn main() { println(~\"hello "
|
#| "~~~~ {.ignore} // main.rs extern crate world; fn main() { println(~\"hello "
|
||||||
#| "\" + world::explore()); } ~~~~"
|
#| "\" + world::explore()); } ~~~~"
|
||||||
msgid ""
|
msgid ""
|
||||||
"~~~~ {.ignore} // `main.rs` extern mod world; fn main() { println!(\"hello "
|
"~~~~ {.ignore} // `main.rs` extern crate world; fn main() { println!(\"hello "
|
||||||
"{}\", world::explore()); } ~~~~"
|
"{}\", world::explore()); } ~~~~"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"// main.rs\n"
|
"// main.rs\n"
|
||||||
"extern mod world;\n"
|
"extern crate world;\n"
|
||||||
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
"fn main() { println(~\"hello \" + world::explore()); }\n"
|
||||||
"~~~~"
|
"~~~~"
|
||||||
|
|
||||||
|
@ -4977,7 +4977,7 @@ msgstr "## 標準ライブラリ"
|
||||||
#: src/doc/tutorial.md:3187
|
#: src/doc/tutorial.md:3187
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "~~~~ {.ignore} let foo = 10;"
|
#| msgid "~~~~ {.ignore} let foo = 10;"
|
||||||
msgid "~~~ {.ignore} extern mod std; ~~~"
|
msgid "~~~ {.ignore} extern crate std; ~~~"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"~~~~ {.ignore}\n"
|
"~~~~ {.ignore}\n"
|
||||||
"let foo = 10;"
|
"let foo = 10;"
|
||||||
|
|
|
@ -759,7 +759,7 @@ A view item manages the namespace of a module.
|
||||||
View items do not define new items, but rather, simply change other items' visibility.
|
View items do not define new items, but rather, simply change other items' visibility.
|
||||||
There are several kinds of view item:
|
There are several kinds of view item:
|
||||||
|
|
||||||
* [`extern mod` declarations](#extern-mod-declarations)
|
* [`extern crate` declarations](#extern-mod-declarations)
|
||||||
* [`use` declarations](#use-declarations)
|
* [`use` declarations](#use-declarations)
|
||||||
|
|
||||||
##### Extern mod declarations
|
##### Extern mod declarations
|
||||||
|
@ -770,7 +770,7 @@ link_attrs : link_attr [ ',' link_attrs ] + ;
|
||||||
link_attr : ident '=' literal ;
|
link_attr : ident '=' literal ;
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
An _`extern mod` declaration_ specifies a dependency on an external crate.
|
An _`extern crate` declaration_ specifies a dependency on an external crate.
|
||||||
The external crate is then bound into the declaring scope
|
The external crate is then bound into the declaring scope
|
||||||
as the `ident` provided in the `extern_mod_decl`.
|
as the `ident` provided in the `extern_mod_decl`.
|
||||||
|
|
||||||
|
@ -782,16 +782,16 @@ against the `crateid` attributes that were declared on the external crate when
|
||||||
it was compiled. If no `crateid` is provided, a default `name` attribute is
|
it was compiled. If no `crateid` is provided, a default `name` attribute is
|
||||||
assumed, equal to the `ident` given in the `extern_mod_decl`.
|
assumed, equal to the `ident` given in the `extern_mod_decl`.
|
||||||
|
|
||||||
Four examples of `extern mod` declarations:
|
Four examples of `extern crate` declarations:
|
||||||
|
|
||||||
~~~~ {.ignore}
|
~~~~ {.ignore}
|
||||||
extern mod pcre;
|
extern crate pcre;
|
||||||
|
|
||||||
extern mod extra; // equivalent to: extern mod extra = "extra";
|
extern crate extra; // equivalent to: extern crate extra = "extra";
|
||||||
|
|
||||||
extern mod rustextra = "extra"; // linking to 'extra' under another name
|
extern crate rustextra = "extra"; // linking to 'extra' under another name
|
||||||
|
|
||||||
extern mod foo = "some/where/rust-foo#foo:1.0"; // a full package ID for external tools
|
extern crate foo = "some/where/rust-foo#foo:1.0"; // a full package ID for external tools
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
##### Use declarations
|
##### Use declarations
|
||||||
|
@ -813,7 +813,7 @@ module item. These declarations may appear at the top of [modules](#modules) and
|
||||||
|
|
||||||
*Note*: Unlike in many languages,
|
*Note*: Unlike in many languages,
|
||||||
`use` declarations in Rust do *not* declare linkage dependency with external crates.
|
`use` declarations in Rust do *not* declare linkage dependency with external crates.
|
||||||
Rather, [`extern mod` declarations](#extern-mod-declarations) declare linkage dependencies.
|
Rather, [`extern crate` declarations](#extern-mod-declarations) declare linkage dependencies.
|
||||||
|
|
||||||
Use declarations support a number of convenient shortcuts:
|
Use declarations support a number of convenient shortcuts:
|
||||||
|
|
||||||
|
@ -869,7 +869,7 @@ This also means that top-level module declarations should be at the crate root i
|
||||||
of the declared modules within `use` items is desired. It is also possible to use `self` and `super`
|
of the declared modules within `use` items is desired. It is also possible to use `self` and `super`
|
||||||
at the beginning of a `use` item to refer to the current and direct parent modules respectively.
|
at the beginning of a `use` item to refer to the current and direct parent modules respectively.
|
||||||
All rules regarding accessing declared modules in `use` declarations applies to both module declarations
|
All rules regarding accessing declared modules in `use` declarations applies to both module declarations
|
||||||
and `extern mod` declarations.
|
and `extern crate` declarations.
|
||||||
|
|
||||||
An example of what will and will not work for `use` items:
|
An example of what will and will not work for `use` items:
|
||||||
|
|
||||||
|
@ -879,7 +879,7 @@ use foo::extra; // good: foo is at the root of the crate
|
||||||
use foo::baz::foobaz; // good: foo is at the root of the crate
|
use foo::baz::foobaz; // good: foo is at the root of the crate
|
||||||
|
|
||||||
mod foo {
|
mod foo {
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use foo::extra::time; // good: foo is at crate root
|
use foo::extra::time; // good: foo is at crate root
|
||||||
// use extra::*; // bad: extra is not at the crate root
|
// use extra::*; // bad: extra is not at the crate root
|
||||||
|
|
|
@ -53,7 +53,7 @@ struct Whizbang;
|
||||||
|
|
||||||
To generate the docs, run `rustdoc universe.rs`. By default, it generates a
|
To generate the docs, run `rustdoc universe.rs`. By default, it generates a
|
||||||
directory called `doc`, with the documentation for `universe` being in
|
directory called `doc`, with the documentation for `universe` being in
|
||||||
`doc/universe/index.html`. If you are using other crates with `extern mod`,
|
`doc/universe/index.html`. If you are using other crates with `extern crate`,
|
||||||
rustdoc will even link to them when you use their types, as long as their
|
rustdoc will even link to them when you use their types, as long as their
|
||||||
documentation has already been generated by a previous run of rustdoc, or the
|
documentation has already been generated by a previous run of rustdoc, or the
|
||||||
crate advertises that its documentation is hosted at a given URL.
|
crate advertises that its documentation is hosted at a given URL.
|
||||||
|
@ -176,7 +176,7 @@ rustdoc --test lib.rs --test-args '--ignored'
|
||||||
|
|
||||||
When testing a library, code examples will often show how functions are used,
|
When testing a library, code examples will often show how functions are used,
|
||||||
and this code often requires `use`-ing paths from the crate. To accomodate this,
|
and this code often requires `use`-ing paths from the crate. To accomodate this,
|
||||||
rustdoc will implicitly add `extern mod <crate>;` where `<crate>` is the name of
|
rustdoc will implicitly add `extern crate <crate>;` where `<crate>` is the name of
|
||||||
the crate being tested to the top of each code example. This means that rustdoc
|
the crate being tested to the top of each code example. This means that rustdoc
|
||||||
must be able to find a compiled version of the library crate being tested. Extra
|
must be able to find a compiled version of the library crate being tested. Extra
|
||||||
search paths may be added via the `-L` flag to `rustdoc`.
|
search paths may be added via the `-L` flag to `rustdoc`.
|
||||||
|
|
|
@ -2581,7 +2581,7 @@ As you can see, your module hierarchy is now three modules deep: There is the cr
|
||||||
function, and the module `farm`. The module `farm` also contains two functions and a third module `barn`,
|
function, and the module `farm`. The module `farm` also contains two functions and a third module `barn`,
|
||||||
which contains a function `hay`.
|
which contains a function `hay`.
|
||||||
|
|
||||||
(In case you already stumbled over `extern mod`: It isn't directly related to a bare `mod`, we'll get to it later. )
|
(In case you already stumbled over `extern crate`: It isn't directly related to a bare `mod`, we'll get to it later. )
|
||||||
|
|
||||||
## Paths and visibility
|
## Paths and visibility
|
||||||
|
|
||||||
|
@ -3018,10 +3018,10 @@ as there really is no reason to start from scratch each time you start a new pro
|
||||||
|
|
||||||
In Rust terminology, we need a way to refer to other crates.
|
In Rust terminology, we need a way to refer to other crates.
|
||||||
|
|
||||||
For that, Rust offers you the `extern mod` declaration:
|
For that, Rust offers you the `extern crate` declaration:
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
extern mod num;
|
extern crate num;
|
||||||
// `num` ships with Rust (much like `extra`; more details further down).
|
// `num` ships with Rust (much like `extra`; more details further down).
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -3030,8 +3030,8 @@ fn main() {
|
||||||
}
|
}
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
Despite its name, `extern mod` is a distinct construct from regular `mod` declarations:
|
Despite its name, `extern crate` is a distinct construct from regular `mod` declarations:
|
||||||
A statement of the form `extern mod foo;` will cause `rustc` to search for the crate `foo`,
|
A statement of the form `extern crate foo;` will cause `rustc` to search for the crate `foo`,
|
||||||
and if it finds a matching binary it lets you use it from inside your crate.
|
and if it finds a matching binary it lets you use it from inside your crate.
|
||||||
|
|
||||||
The effect it has on your module hierarchy mirrors aspects of both `mod` and `use`:
|
The effect it has on your module hierarchy mirrors aspects of both `mod` and `use`:
|
||||||
|
@ -3039,19 +3039,19 @@ The effect it has on your module hierarchy mirrors aspects of both `mod` and `us
|
||||||
- Like `mod`, it causes `rustc` to actually emit code:
|
- Like `mod`, it causes `rustc` to actually emit code:
|
||||||
The linkage information the binary needs to use the library `foo`.
|
The linkage information the binary needs to use the library `foo`.
|
||||||
|
|
||||||
- But like `use`, all `extern mod` statements that refer to the same library are interchangeable,
|
- But like `use`, all `extern crate` statements that refer to the same library are interchangeable,
|
||||||
as each one really just presents an alias to an external module (the crate root of the library
|
as each one really just presents an alias to an external module (the crate root of the library
|
||||||
you're linking against).
|
you're linking against).
|
||||||
|
|
||||||
Remember how `use`-statements have to go before local declarations because the latter shadows the former?
|
Remember how `use`-statements have to go before local declarations because the latter shadows the former?
|
||||||
Well, `extern mod` statements also have their own rules in that regard:
|
Well, `extern crate` statements also have their own rules in that regard:
|
||||||
Both `use` and local declarations can shadow them, so the rule is that `extern mod` has to go in front
|
Both `use` and local declarations can shadow them, so the rule is that `extern crate` has to go in front
|
||||||
of both `use` and local declarations.
|
of both `use` and local declarations.
|
||||||
|
|
||||||
Which can result in something like this:
|
Which can result in something like this:
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
extern mod num;
|
extern crate num;
|
||||||
|
|
||||||
use farm::dog;
|
use farm::dog;
|
||||||
use num::rational::Ratio;
|
use num::rational::Ratio;
|
||||||
|
@ -3071,7 +3071,7 @@ they model most closely what people expect to shadow.
|
||||||
|
|
||||||
## Package ids
|
## Package ids
|
||||||
|
|
||||||
If you use `extern mod`, per default `rustc` will look for libraries in the library search path (which you can
|
If you use `extern crate`, per default `rustc` will look for libraries in the library search path (which you can
|
||||||
extend with the `-L` switch).
|
extend with the `-L` switch).
|
||||||
|
|
||||||
## Crate metadata and settings
|
## Crate metadata and settings
|
||||||
|
@ -3098,14 +3098,14 @@ Therefore, if you plan to compile your crate as a library, you should annotate i
|
||||||
# fn farm() {}
|
# fn farm() {}
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
You can also specify package ID information in a `extern mod` statement. For
|
You can also specify package ID information in a `extern crate` statement. For
|
||||||
example, these `extern mod` statements would both accept and select the
|
example, these `extern crate` statements would both accept and select the
|
||||||
crate define above:
|
crate define above:
|
||||||
|
|
||||||
~~~~ {.ignore}
|
~~~~ {.ignore}
|
||||||
extern mod farm;
|
extern crate farm;
|
||||||
extern mod farm = "farm#2.5";
|
extern crate farm = "farm#2.5";
|
||||||
extern mod my_farm = "farm";
|
extern crate my_farm = "farm";
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
Other crate settings and metadata include things like enabling/disabling certain errors or warnings,
|
Other crate settings and metadata include things like enabling/disabling certain errors or warnings,
|
||||||
|
@ -3133,14 +3133,14 @@ We define two crates, and use one of them as a library in the other.
|
||||||
~~~~
|
~~~~
|
||||||
// `world.rs`
|
// `world.rs`
|
||||||
#[crate_id = "world#0.42"];
|
#[crate_id = "world#0.42"];
|
||||||
# extern mod extra;
|
# extern crate extra;
|
||||||
pub fn explore() -> &'static str { "world" }
|
pub fn explore() -> &'static str { "world" }
|
||||||
# fn main() {}
|
# fn main() {}
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
~~~~ {.ignore}
|
~~~~ {.ignore}
|
||||||
// `main.rs`
|
// `main.rs`
|
||||||
extern mod world;
|
extern crate world;
|
||||||
fn main() { println!("hello {}", world::explore()); }
|
fn main() { println!("hello {}", world::explore()); }
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
|
@ -3169,7 +3169,7 @@ in the `std` library, which is a crate that ships with Rust.
|
||||||
The only magical thing that happens is that `rustc` automatically inserts this line into your crate root:
|
The only magical thing that happens is that `rustc` automatically inserts this line into your crate root:
|
||||||
|
|
||||||
~~~ {.ignore}
|
~~~ {.ignore}
|
||||||
extern mod std;
|
extern crate std;
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
As well as this line into every module body:
|
As well as this line into every module body:
|
||||||
|
@ -3221,7 +3221,7 @@ See the [API documentation][stddoc] for details.
|
||||||
|
|
||||||
Rust ships with crates such as 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
|
that are however not important enough to deserve a place in the standard
|
||||||
library. You can link to a library such as `extra` with an `extern mod extra;`.
|
library. You can link to a library such as `extra` with an `extern crate extra;`.
|
||||||
|
|
||||||
[extra library]: extra/index.html
|
[extra library]: extra/index.html
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#[cfg(rustdoc)]
|
#[cfg(rustdoc)]
|
||||||
extern mod this = "rustdoc";
|
extern crate this = "rustdoc";
|
||||||
|
|
||||||
#[cfg(rustc)]
|
#[cfg(rustc)]
|
||||||
extern mod this = "rustc";
|
extern crate this = "rustc";
|
||||||
|
|
||||||
fn main() { this::main() }
|
fn main() { this::main() }
|
||||||
|
|
|
@ -71,8 +71,8 @@ d.write(
|
||||||
"""
|
"""
|
||||||
// AUTO-GENERATED FILE: DO NOT EDIT
|
// AUTO-GENERATED FILE: DO NOT EDIT
|
||||||
#[feature(globs, managed_boxes)];
|
#[feature(globs, managed_boxes)];
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
extern mod run_pass_stage2;
|
extern crate run_pass_stage2;
|
||||||
use run_pass_stage2::*;
|
use run_pass_stage2::*;
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::io::Writer;
|
use std::io::Writer;
|
||||||
|
|
|
@ -129,8 +129,7 @@
|
||||||
(defconst rust-mode-keywords
|
(defconst rust-mode-keywords
|
||||||
'("as"
|
'("as"
|
||||||
"break"
|
"break"
|
||||||
"continue"
|
"continue" "crate"
|
||||||
"crate"
|
|
||||||
"do"
|
"do"
|
||||||
"else" "enum" "extern"
|
"else" "enum" "extern"
|
||||||
"false" "fn" "for"
|
"false" "fn" "for"
|
||||||
|
|
|
@ -28,7 +28,7 @@ CODE_BLOCK_DELIM_REGEX = re.compile(r'~~~')
|
||||||
COMMENT_REGEX = re.compile(r'^# ')
|
COMMENT_REGEX = re.compile(r'^# ')
|
||||||
COMPILER_DIRECTIVE_REGEX = re.compile(r'\#\[(.*)\];')
|
COMPILER_DIRECTIVE_REGEX = re.compile(r'\#\[(.*)\];')
|
||||||
ELLIPSES_REGEX = re.compile(r'\.\.\.')
|
ELLIPSES_REGEX = re.compile(r'\.\.\.')
|
||||||
EXTERN_MOD_REGEX = re.compile(r'\bextern mod extra\b')
|
EXTERN_CRATE_REGEX = re.compile(r'\bextern crate extra\b')
|
||||||
MAIN_FUNCTION_REGEX = re.compile(r'\bfn main\b')
|
MAIN_FUNCTION_REGEX = re.compile(r'\bfn main\b')
|
||||||
TAGS_REGEX = re.compile(r'\.([\w-]*)')
|
TAGS_REGEX = re.compile(r'\.([\w-]*)')
|
||||||
|
|
||||||
|
@ -49,12 +49,12 @@ OUTPUT_BLOCK_HEADER = '\n'.join((
|
||||||
|
|
||||||
def add_extern_mod(block):
|
def add_extern_mod(block):
|
||||||
if not has_extern_mod(block):
|
if not has_extern_mod(block):
|
||||||
# add `extern mod extra;` after compiler directives
|
# add `extern crate extra;` after compiler directives
|
||||||
directives = []
|
directives = []
|
||||||
while len(block) and is_compiler_directive(block[0]):
|
while len(block) and is_compiler_directive(block[0]):
|
||||||
directives.append(block.popleft())
|
directives.append(block.popleft())
|
||||||
|
|
||||||
block.appendleft("\nextern mod extra;\n\n")
|
block.appendleft("\nextern crate extra;\n\n")
|
||||||
block.extendleft(reversed(directives))
|
block.extendleft(reversed(directives))
|
||||||
|
|
||||||
return block
|
return block
|
||||||
|
@ -112,8 +112,8 @@ def extract_code_fragments(dest_dir, lines):
|
||||||
|
|
||||||
|
|
||||||
def has_extern_mod(block):
|
def has_extern_mod(block):
|
||||||
"""Checks if a code block has the line `extern mod extra`."""
|
"""Checks if a code block has the line `extern crate extra`."""
|
||||||
find_extern_mod = lambda x: re.search(EXTERN_MOD_REGEX, x)
|
find_extern_mod = lambda x: re.search(EXTERN_CRATE_REGEX, x)
|
||||||
return any(imap(find_extern_mod, block))
|
return any(imap(find_extern_mod, block))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ TEMPLATE = """// Copyright {year} The Rust Project Developers. See the COPYRIGHT
|
||||||
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
|
// This file was auto-generated using 'src/etc/generate-keyword-span-tests.py'
|
||||||
|
|
||||||
#[feature(struct_variant)];
|
#[feature(struct_variant)];
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
{error_deriving}
|
{error_deriving}
|
||||||
struct Error;
|
struct Error;
|
||||||
|
|
|
@ -22,9 +22,7 @@
|
||||||
#[allow(missing_doc)];
|
#[allow(missing_doc)];
|
||||||
#[feature(managed_boxes)];
|
#[feature(managed_boxes)];
|
||||||
|
|
||||||
extern mod collections;
|
extern crate collections;
|
||||||
|
|
||||||
#[cfg(test)] extern mod extra;
|
|
||||||
|
|
||||||
use collections::list::{List, Cons, Nil};
|
use collections::list::{List, Cons, Nil};
|
||||||
use collections::list;
|
use collections::list;
|
||||||
|
@ -506,8 +504,9 @@ impl<T> Drop for TypedArena<T> {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
|
extern crate extra;
|
||||||
use super::{Arena, TypedArena};
|
use super::{Arena, TypedArena};
|
||||||
use extra::test::BenchHarness;
|
use self::extra::test::BenchHarness;
|
||||||
|
|
||||||
struct Point {
|
struct Point {
|
||||||
x: int,
|
x: int,
|
||||||
|
|
|
@ -19,9 +19,8 @@
|
||||||
|
|
||||||
#[feature(macro_rules, managed_boxes)];
|
#[feature(macro_rules, managed_boxes)];
|
||||||
|
|
||||||
#[cfg(test)] extern mod extra;
|
extern crate serialize;
|
||||||
|
#[cfg(test)] extern crate extra; // benchmark tests need this
|
||||||
extern mod serialize;
|
|
||||||
|
|
||||||
pub use bitv::Bitv;
|
pub use bitv::Bitv;
|
||||||
pub use btree::BTree;
|
pub use btree::BTree;
|
||||||
|
|
|
@ -59,7 +59,7 @@ the code for these traits: `#[deriving(Decodable, Encodable)]`
|
||||||
To encode using Encodable :
|
To encode using Encodable :
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
extern mod serialize;
|
extern crate serialize;
|
||||||
use extra::json;
|
use extra::json;
|
||||||
use std::io;
|
use std::io;
|
||||||
use serialize::Encodable;
|
use serialize::Encodable;
|
||||||
|
@ -98,7 +98,7 @@ A basic `ToJson` example using a TreeMap of attribute name / attribute value:
|
||||||
|
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
extern mod collections;
|
extern crate collections;
|
||||||
|
|
||||||
use extra::json;
|
use extra::json;
|
||||||
use extra::json::ToJson;
|
use extra::json::ToJson;
|
||||||
|
@ -128,7 +128,7 @@ fn main() {
|
||||||
To decode a json string using `Decodable` trait :
|
To decode a json string using `Decodable` trait :
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
extern mod serialize;
|
extern crate serialize;
|
||||||
use serialize::Decodable;
|
use serialize::Decodable;
|
||||||
|
|
||||||
#[deriving(Decodable)]
|
#[deriving(Decodable)]
|
||||||
|
@ -154,7 +154,7 @@ Create a struct called TestStruct1 and serialize and deserialize it to and from
|
||||||
using the serialization API, using the derived serialization code.
|
using the serialization API, using the derived serialization code.
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
extern mod serialize;
|
extern crate serialize;
|
||||||
use extra::json;
|
use extra::json;
|
||||||
use serialize::{Encodable, Decodable};
|
use serialize::{Encodable, Decodable};
|
||||||
|
|
||||||
|
@ -186,8 +186,8 @@ This example use the ToJson impl to unserialize the json string.
|
||||||
Example of `ToJson` trait implementation for TestStruct1.
|
Example of `ToJson` trait implementation for TestStruct1.
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
extern mod serialize;
|
extern crate serialize;
|
||||||
extern mod collections;
|
extern crate collections;
|
||||||
|
|
||||||
use extra::json;
|
use extra::json;
|
||||||
use extra::json::ToJson;
|
use extra::json::ToJson;
|
||||||
|
|
|
@ -34,10 +34,10 @@ Rust extras are part of the standard Rust distribution.
|
||||||
#[deny(non_camel_case_types)];
|
#[deny(non_camel_case_types)];
|
||||||
#[deny(missing_doc)];
|
#[deny(missing_doc)];
|
||||||
|
|
||||||
extern mod sync;
|
extern crate sync;
|
||||||
extern mod serialize;
|
extern crate serialize;
|
||||||
|
|
||||||
extern mod collections;
|
extern crate collections;
|
||||||
|
|
||||||
// Utility modules
|
// Utility modules
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
// simplest interface possible for representing and running tests
|
// simplest interface possible for representing and running tests
|
||||||
// while providing a base that other test frameworks may build off of.
|
// while providing a base that other test frameworks may build off of.
|
||||||
|
|
||||||
extern mod getopts;
|
extern crate getopts;
|
||||||
extern mod term;
|
extern crate term;
|
||||||
|
|
||||||
use json::ToJson;
|
use json::ToJson;
|
||||||
use json;
|
use json;
|
||||||
|
|
|
@ -23,7 +23,7 @@ To load the extension and use it:
|
||||||
|
|
||||||
```rust,ignore
|
```rust,ignore
|
||||||
#[phase(syntax)]
|
#[phase(syntax)]
|
||||||
extern mod fourcc;
|
extern crate fourcc;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let val = fourcc!("\xC0\xFF\xEE!");
|
let val = fourcc!("\xC0\xFF\xEE!");
|
||||||
|
@ -46,7 +46,7 @@ fn main() {
|
||||||
|
|
||||||
#[feature(macro_registrar, managed_boxes)];
|
#[feature(macro_registrar, managed_boxes)];
|
||||||
|
|
||||||
extern mod syntax;
|
extern crate syntax;
|
||||||
|
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::ast::Name;
|
use syntax::ast::Name;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
//! file name following `-o`, and accepts both `-h` and `--help` as optional flags.
|
//! file name following `-o`, and accepts both `-h` and `--help` as optional flags.
|
||||||
//!
|
//!
|
||||||
//! ~~~{.rust}
|
//! ~~~{.rust}
|
||||||
//! extern mod getopts;
|
//! extern crate getopts;
|
||||||
//! use getopts::{optopt,optflag,getopts,OptGroup};
|
//! use getopts::{optopt,optflag,getopts,OptGroup};
|
||||||
//! use std::os;
|
//! use std::os;
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
//! # Starting with libgreen
|
//! # Starting with libgreen
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! extern mod green;
|
//! extern crate green;
|
||||||
//!
|
//!
|
||||||
//! #[start]
|
//! #[start]
|
||||||
//! fn start(argc: int, argv: **u8) -> int { green::start(argc, argv, main) }
|
//! fn start(argc: int, argv: **u8) -> int { green::start(argc, argv, main) }
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
//! # Starting with libnative
|
//! # Starting with libnative
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! extern mod native;
|
//! extern crate native;
|
||||||
//!
|
//!
|
||||||
//! #[start]
|
//! #[start]
|
||||||
//! fn start(argc: int, argv: **u8) -> int { native::start(argc, argv, main) }
|
//! fn start(argc: int, argv: **u8) -> int { native::start(argc, argv, main) }
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
//! # Force spawning a native task
|
//! # Force spawning a native task
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! extern mod native;
|
//! extern crate native;
|
||||||
//!
|
//!
|
||||||
//! fn main() {
|
//! fn main() {
|
||||||
//! // We're not sure whether this main function is run in 1:1 or M:N mode.
|
//! // We're not sure whether this main function is run in 1:1 or M:N mode.
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#[crate_type = "dylib"];
|
#[crate_type = "dylib"];
|
||||||
#[license = "MIT/ASL2"];
|
#[license = "MIT/ASL2"];
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
pub mod bigint;
|
pub mod bigint;
|
||||||
pub mod rational;
|
pub mod rational;
|
||||||
|
|
|
@ -275,7 +275,7 @@ We're going to be building a module that looks more or less like:
|
||||||
|
|
||||||
mod __test {
|
mod __test {
|
||||||
#[!resolve_unexported]
|
#[!resolve_unexported]
|
||||||
extern mod extra (name = "extra", vers = "...");
|
extern crate extra (name = "extra", vers = "...");
|
||||||
fn main() {
|
fn main() {
|
||||||
#[main];
|
#[main];
|
||||||
extra::test::test_main_static(::os::args(), tests)
|
extra::test::test_main_static(::os::args(), tests)
|
||||||
|
|
|
@ -31,14 +31,14 @@ This API is completely unstable and subject to change.
|
||||||
#[allow(unknown_features)]; // Note: remove it after a snapshot.
|
#[allow(unknown_features)]; // Note: remove it after a snapshot.
|
||||||
#[feature(quote)];
|
#[feature(quote)];
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
extern mod flate;
|
extern crate flate;
|
||||||
extern mod arena;
|
extern crate arena;
|
||||||
extern mod syntax;
|
extern crate syntax;
|
||||||
extern mod serialize;
|
extern crate serialize;
|
||||||
extern mod sync;
|
extern crate sync;
|
||||||
extern mod getopts;
|
extern crate getopts;
|
||||||
extern mod collections;
|
extern crate collections;
|
||||||
|
|
||||||
use back::link;
|
use back::link;
|
||||||
use driver::session;
|
use driver::session;
|
||||||
|
|
|
@ -169,7 +169,7 @@ fn extract_crate_info(i: &ast::ViewItem) -> Option<CrateInfo> {
|
||||||
match i.node {
|
match i.node {
|
||||||
ast::ViewItemExternMod(ident, ref path_opt, id) => {
|
ast::ViewItemExternMod(ident, ref path_opt, id) => {
|
||||||
let ident = token::get_ident(ident);
|
let ident = token::get_ident(ident);
|
||||||
debug!("resolving extern mod stmt. ident: {:?} path_opt: {:?}",
|
debug!("resolving extern crate stmt. ident: {:?} path_opt: {:?}",
|
||||||
ident, path_opt);
|
ident, path_opt);
|
||||||
let (name, version) = match *path_opt {
|
let (name, version) = match *path_opt {
|
||||||
Some((ref path_str, _)) => {
|
Some((ref path_str, _)) => {
|
||||||
|
|
|
@ -69,7 +69,7 @@ pub struct CStore {
|
||||||
intr: @IdentInterner
|
intr: @IdentInterner
|
||||||
}
|
}
|
||||||
|
|
||||||
// Map from NodeId's of local extern mod statements to crate numbers
|
// Map from NodeId's of local extern crate statements to crate numbers
|
||||||
type extern_mod_crate_map = HashMap<ast::NodeId, ast::CrateNum>;
|
type extern_mod_crate_map = HashMap<ast::NodeId, ast::CrateNum>;
|
||||||
|
|
||||||
impl CStore {
|
impl CStore {
|
||||||
|
|
|
@ -418,7 +418,7 @@ struct Module {
|
||||||
imports: RefCell<~[@ImportDirective]>,
|
imports: RefCell<~[@ImportDirective]>,
|
||||||
|
|
||||||
// The external module children of this node that were declared with
|
// The external module children of this node that were declared with
|
||||||
// `extern mod`.
|
// `extern crate`.
|
||||||
external_module_children: RefCell<HashMap<Name, @Module>>,
|
external_module_children: RefCell<HashMap<Name, @Module>>,
|
||||||
|
|
||||||
// The anonymous children of this node. Anonymous children are pseudo-
|
// The anonymous children of this node. Anonymous children are pseudo-
|
||||||
|
@ -2679,7 +2679,7 @@ impl Resolver {
|
||||||
};
|
};
|
||||||
self.resolve_error(span,
|
self.resolve_error(span,
|
||||||
format!("unresolved import. maybe \
|
format!("unresolved import. maybe \
|
||||||
a missing `extern mod \
|
a missing `extern crate \
|
||||||
{}`?",
|
{}`?",
|
||||||
segment_name));
|
segment_name));
|
||||||
return Failed;
|
return Failed;
|
||||||
|
|
|
@ -1021,7 +1021,7 @@ fn item_module(w: &mut Writer, cx: &Context,
|
||||||
clean::ViewItemItem(ref item) => {
|
clean::ViewItemItem(ref item) => {
|
||||||
match item.inner {
|
match item.inner {
|
||||||
clean::ExternMod(ref name, ref src, _) => {
|
clean::ExternMod(ref name, ref src, _) => {
|
||||||
if_ok!(write!(w, "<tr><td><code>extern mod {}",
|
if_ok!(write!(w, "<tr><td><code>extern crate {}",
|
||||||
name.as_slice()));
|
name.as_slice()));
|
||||||
match *src {
|
match *src {
|
||||||
Some(ref src) => if_ok!(write!(w, " = \"{}\"",
|
Some(ref src) => if_ok!(write!(w, " = \"{}\"",
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
|
|
||||||
#[feature(globs, struct_variant, managed_boxes)];
|
#[feature(globs, struct_variant, managed_boxes)];
|
||||||
|
|
||||||
extern mod syntax;
|
extern crate syntax;
|
||||||
extern mod rustc;
|
extern crate rustc;
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
extern mod serialize;
|
extern crate serialize;
|
||||||
extern mod sync;
|
extern crate sync;
|
||||||
extern mod getopts;
|
extern crate getopts;
|
||||||
extern mod collections;
|
extern crate collections;
|
||||||
|
|
||||||
use std::local_data;
|
use std::local_data;
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
|
@ -144,10 +144,10 @@ fn maketest(s: &str, cratename: &str) -> ~str {
|
||||||
#[allow(unused_variable, dead_assignment, unused_mut, attribute_usage, dead_code)];
|
#[allow(unused_variable, dead_assignment, unused_mut, attribute_usage, dead_code)];
|
||||||
";
|
";
|
||||||
if s.contains("extra") {
|
if s.contains("extra") {
|
||||||
prog.push_str("extern mod extra;\n");
|
prog.push_str("extern crate extra;\n");
|
||||||
}
|
}
|
||||||
if s.contains(cratename) {
|
if s.contains(cratename) {
|
||||||
prog.push_str(format!("extern mod {};\n", cratename));
|
prog.push_str(format!("extern crate {};\n", cratename));
|
||||||
}
|
}
|
||||||
if s.contains("fn main") {
|
if s.contains("fn main") {
|
||||||
prog.push_str(s);
|
prog.push_str(s);
|
||||||
|
|
|
@ -42,7 +42,7 @@ via `close` and `delete` methods.
|
||||||
#[feature(macro_rules)];
|
#[feature(macro_rules)];
|
||||||
#[deny(unused_result, unused_must_use)];
|
#[deny(unused_result, unused_must_use)];
|
||||||
|
|
||||||
#[cfg(test)] extern mod green;
|
#[cfg(test)] extern crate green;
|
||||||
|
|
||||||
use std::cast;
|
use std::cast;
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
|
@ -63,7 +63,7 @@ impl<'a> ToBase64 for &'a [u8] {
|
||||||
* # Example
|
* # Example
|
||||||
*
|
*
|
||||||
* ```rust
|
* ```rust
|
||||||
* extern mod serialize;
|
* extern crate serialize;
|
||||||
* use serialize::base64::{ToBase64, STANDARD};
|
* use serialize::base64::{ToBase64, STANDARD};
|
||||||
*
|
*
|
||||||
* fn main () {
|
* fn main () {
|
||||||
|
@ -189,7 +189,7 @@ impl<'a> FromBase64 for &'a str {
|
||||||
* This converts a string literal to base64 and back.
|
* This converts a string literal to base64 and back.
|
||||||
*
|
*
|
||||||
* ```rust
|
* ```rust
|
||||||
* extern mod serialize;
|
* extern crate serialize;
|
||||||
* use serialize::base64::{ToBase64, FromBase64, STANDARD};
|
* use serialize::base64::{ToBase64, FromBase64, STANDARD};
|
||||||
* use std::str;
|
* use std::str;
|
||||||
*
|
*
|
||||||
|
|
|
@ -28,7 +28,7 @@ impl<'a> ToHex for &'a [u8] {
|
||||||
* # Example
|
* # Example
|
||||||
*
|
*
|
||||||
* ```rust
|
* ```rust
|
||||||
* extern mod serialize;
|
* extern crate serialize;
|
||||||
* use serialize::hex::ToHex;
|
* use serialize::hex::ToHex;
|
||||||
*
|
*
|
||||||
* fn main () {
|
* fn main () {
|
||||||
|
@ -89,7 +89,7 @@ impl<'a> FromHex for &'a str {
|
||||||
* This converts a string literal to hexadecimal and back.
|
* This converts a string literal to hexadecimal and back.
|
||||||
*
|
*
|
||||||
* ```rust
|
* ```rust
|
||||||
* extern mod serialize;
|
* extern crate serialize;
|
||||||
* use serialize::hex::{FromHex, ToHex};
|
* use serialize::hex::{FromHex, ToHex};
|
||||||
* use std::str;
|
* use std::str;
|
||||||
*
|
*
|
||||||
|
|
|
@ -24,7 +24,7 @@ Core encoding and decoding interfaces.
|
||||||
|
|
||||||
// test harness access
|
// test harness access
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
pub use self::serialize::{Decoder, Encoder, Decodable, Encodable,
|
pub use self::serialize::{Decoder, Encoder, Decodable, Encodable,
|
||||||
DecoderHelpers, EncoderHelpers};
|
DecoderHelpers, EncoderHelpers};
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
//! `std` is imported at the topmost level of every crate by default, as
|
//! `std` is imported at the topmost level of every crate by default, as
|
||||||
//! if the first line of each crate was
|
//! if the first line of each crate was
|
||||||
//!
|
//!
|
||||||
//! extern mod std;
|
//! extern crate std;
|
||||||
//!
|
//!
|
||||||
//! This means that the contents of std can be accessed from any context
|
//! This means that the contents of std can be accessed from any context
|
||||||
//! with the `std::` path prefix, as in `use std::vec`, `use std::task::spawn`,
|
//! with the `std::` path prefix, as in `use std::vec`, `use std::task::spawn`,
|
||||||
|
@ -64,15 +64,15 @@
|
||||||
// When testing libstd, bring in libuv as the I/O backend so tests can print
|
// When testing libstd, bring in libuv as the I/O backend so tests can print
|
||||||
// things and all of the std::io tests have an I/O interface to run on top
|
// things and all of the std::io tests have an I/O interface to run on top
|
||||||
// of
|
// of
|
||||||
#[cfg(test)] extern mod rustuv = "rustuv";
|
#[cfg(test)] extern crate rustuv = "rustuv";
|
||||||
#[cfg(test)] extern mod native = "native";
|
#[cfg(test)] extern crate native = "native";
|
||||||
#[cfg(test)] extern mod green = "green";
|
#[cfg(test)] extern crate green = "green";
|
||||||
|
|
||||||
// Make extra accessible for benchmarking
|
// Make extra accessible for benchmarking
|
||||||
#[cfg(test)] extern mod extra = "extra";
|
#[cfg(test)] extern crate extra = "extra";
|
||||||
|
|
||||||
// Make std testable by not duplicating lang items. See #2912
|
// Make std testable by not duplicating lang items. See #2912
|
||||||
#[cfg(test)] extern mod realstd = "std";
|
#[cfg(test)] extern crate realstd = "std";
|
||||||
#[cfg(test)] pub use kinds = realstd::kinds;
|
#[cfg(test)] pub use kinds = realstd::kinds;
|
||||||
#[cfg(test)] pub use ops = realstd::ops;
|
#[cfg(test)] pub use ops = realstd::ops;
|
||||||
#[cfg(test)] pub use cmp = realstd::cmp;
|
#[cfg(test)] pub use cmp = realstd::cmp;
|
||||||
|
|
|
@ -495,7 +495,7 @@ impl Drop for Mutex {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
extern mod native;
|
extern crate native;
|
||||||
use super::{Mutex, StaticMutex, MUTEX_INIT};
|
use super::{Mutex, StaticMutex, MUTEX_INIT};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -1058,7 +1058,7 @@ pub enum ViewItem_ {
|
||||||
// ident: name used to refer to this crate in the code
|
// ident: name used to refer to this crate in the code
|
||||||
// optional (InternedString,StrStyle): if present, this is a location
|
// optional (InternedString,StrStyle): if present, this is a location
|
||||||
// (containing arbitrary characters) from which to fetch the crate sources
|
// (containing arbitrary characters) from which to fetch the crate sources
|
||||||
// For example, extern mod whatever = "github.com/mozilla/rust"
|
// For example, extern crate whatever = "github.com/mozilla/rust"
|
||||||
ViewItemExternMod(Ident, Option<(InternedString,StrStyle)>, NodeId),
|
ViewItemExternMod(Ident, Option<(InternedString,StrStyle)>, NodeId),
|
||||||
ViewItemUse(~[@ViewPath]),
|
ViewItemUse(~[@ViewPath]),
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,10 +32,10 @@ This API is completely unstable and subject to change.
|
||||||
|
|
||||||
#[deny(non_camel_case_types)];
|
#[deny(non_camel_case_types)];
|
||||||
|
|
||||||
#[cfg(test)] extern mod extra;
|
#[cfg(test)] extern crate extra;
|
||||||
extern mod serialize;
|
extern crate serialize;
|
||||||
extern mod term;
|
extern crate term;
|
||||||
extern mod collections;
|
extern crate collections;
|
||||||
|
|
||||||
pub mod util {
|
pub mod util {
|
||||||
pub mod interner;
|
pub mod interner;
|
||||||
|
|
|
@ -4528,7 +4528,7 @@ impl Parser {
|
||||||
// parse one of the items or view items allowed by the
|
// parse one of the items or view items allowed by the
|
||||||
// flags; on failure, return IoviNone.
|
// flags; on failure, return IoviNone.
|
||||||
// NB: this function no longer parses the items inside an
|
// NB: this function no longer parses the items inside an
|
||||||
// extern mod.
|
// extern crate.
|
||||||
fn parse_item_or_view_item(&mut self,
|
fn parse_item_or_view_item(&mut self,
|
||||||
attrs: ~[Attribute],
|
attrs: ~[Attribute],
|
||||||
macros_allowed: bool)
|
macros_allowed: bool)
|
||||||
|
@ -4567,7 +4567,7 @@ impl Parser {
|
||||||
|
|
||||||
if next_is_mod || self.eat_keyword(keywords::Crate) {
|
if next_is_mod || self.eat_keyword(keywords::Crate) {
|
||||||
if next_is_mod {
|
if next_is_mod {
|
||||||
self.span_err(self.span,
|
self.span_err(mk_sp(lo, self.last_span.hi),
|
||||||
format!("`extern mod` is obsolete, use \
|
format!("`extern mod` is obsolete, use \
|
||||||
`extern crate` instead \
|
`extern crate` instead \
|
||||||
to refer to external crates."))
|
to refer to external crates."))
|
||||||
|
@ -4970,7 +4970,7 @@ impl Parser {
|
||||||
let mut items = ~[];
|
let mut items = ~[];
|
||||||
|
|
||||||
// I think this code would probably read better as a single
|
// I think this code would probably read better as a single
|
||||||
// loop with a mutable three-state-variable (for extern mods,
|
// loop with a mutable three-state-variable (for extern crates,
|
||||||
// view items, and regular items) ... except that because
|
// view items, and regular items) ... except that because
|
||||||
// of macros, I'd like to delay that entire check until later.
|
// of macros, I'd like to delay that entire check until later.
|
||||||
loop {
|
loop {
|
||||||
|
@ -4986,12 +4986,12 @@ impl Parser {
|
||||||
IoviViewItem(view_item) => {
|
IoviViewItem(view_item) => {
|
||||||
match view_item.node {
|
match view_item.node {
|
||||||
ViewItemUse(..) => {
|
ViewItemUse(..) => {
|
||||||
// `extern mod` must precede `use`.
|
// `extern crate` must precede `use`.
|
||||||
extern_mod_allowed = false;
|
extern_mod_allowed = false;
|
||||||
}
|
}
|
||||||
ViewItemExternMod(..) if !extern_mod_allowed => {
|
ViewItemExternMod(..) if !extern_mod_allowed => {
|
||||||
self.span_err(view_item.span,
|
self.span_err(view_item.span,
|
||||||
"\"extern mod\" declarations are not allowed here");
|
"\"extern crate\" declarations are not allowed here");
|
||||||
}
|
}
|
||||||
ViewItemExternMod(..) => {}
|
ViewItemExternMod(..) => {}
|
||||||
}
|
}
|
||||||
|
@ -5019,7 +5019,7 @@ impl Parser {
|
||||||
IoviViewItem(view_item) => {
|
IoviViewItem(view_item) => {
|
||||||
attrs = self.parse_outer_attributes();
|
attrs = self.parse_outer_attributes();
|
||||||
self.span_err(view_item.span,
|
self.span_err(view_item.span,
|
||||||
"`use` and `extern mod` declarations must precede items");
|
"`use` and `extern crate` declarations must precede items");
|
||||||
}
|
}
|
||||||
IoviItem(item) => {
|
IoviItem(item) => {
|
||||||
attrs = self.parse_outer_attributes();
|
attrs = self.parse_outer_attributes();
|
||||||
|
@ -5059,7 +5059,7 @@ impl Parser {
|
||||||
IoviViewItem(view_item) => {
|
IoviViewItem(view_item) => {
|
||||||
// I think this can't occur:
|
// I think this can't occur:
|
||||||
self.span_err(view_item.span,
|
self.span_err(view_item.span,
|
||||||
"`use` and `extern mod` declarations must precede items");
|
"`use` and `extern crate` declarations must precede items");
|
||||||
}
|
}
|
||||||
IoviItem(item) => {
|
IoviItem(item) => {
|
||||||
// FIXME #5668: this will occur for a macro invocation:
|
// FIXME #5668: this will occur for a macro invocation:
|
||||||
|
|
|
@ -2061,7 +2061,7 @@ pub fn print_view_item(s: &mut State, item: &ast::ViewItem) -> io::IoResult<()>
|
||||||
if_ok!(print_visibility(s, item.vis));
|
if_ok!(print_visibility(s, item.vis));
|
||||||
match item.node {
|
match item.node {
|
||||||
ast::ViewItemExternMod(id, ref optional_path, _) => {
|
ast::ViewItemExternMod(id, ref optional_path, _) => {
|
||||||
if_ok!(head(s, "extern mod"));
|
if_ok!(head(s, "extern crate"));
|
||||||
if_ok!(print_ident(s, id));
|
if_ok!(print_ident(s, id));
|
||||||
for &(ref p, style) in optional_path.iter() {
|
for &(ref p, style) in optional_path.iter() {
|
||||||
if_ok!(space(&mut s.s));
|
if_ok!(space(&mut s.s));
|
||||||
|
|
|
@ -61,8 +61,8 @@ Examples of string representations:
|
||||||
|
|
||||||
// test harness access
|
// test harness access
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
extern mod serialize;
|
extern crate serialize;
|
||||||
|
|
||||||
use std::str;
|
use std::str;
|
||||||
use std::vec;
|
use std::vec;
|
||||||
|
|
|
@ -2,8 +2,8 @@ S 2014-02-14 18477ac
|
||||||
freebsd-x86_64 102df7dfab2a1c59d9e2f16a3f02f368310dd022
|
freebsd-x86_64 102df7dfab2a1c59d9e2f16a3f02f368310dd022
|
||||||
linux-i386 fcf5891e9b3c7c9ef5ee5ea37e62089346099425
|
linux-i386 fcf5891e9b3c7c9ef5ee5ea37e62089346099425
|
||||||
linux-x86_64 d7c2df185fd2e25b4b8f5b2caad277b5ba664b81
|
linux-x86_64 d7c2df185fd2e25b4b8f5b2caad277b5ba664b81
|
||||||
macos-i386
|
macos-i386 c15faa408339ceebbb68e952e9bf7f2624ceb9e0
|
||||||
macos-x86_64
|
macos-x86_64 445c6759db5e69250b8a8631ea7751d1474e4250
|
||||||
winnt-i386 f78a892f47627f34233e44c2ff4a00b68063a2ce
|
winnt-i386 f78a892f47627f34233e44c2ff4a00b68063a2ce
|
||||||
|
|
||||||
S 2014-02-12 c62f6ce
|
S 2014-02-12 c62f6ce
|
||||||
|
|
|
@ -13,6 +13,6 @@
|
||||||
#[crate_id="crateresolve4b#0.1"];
|
#[crate_id="crateresolve4b#0.1"];
|
||||||
#[crate_type = "lib"];
|
#[crate_type = "lib"];
|
||||||
|
|
||||||
extern mod crateresolve4a = "crateresolve4a#0.2";
|
extern crate crateresolve4a = "crateresolve4a#0.2";
|
||||||
|
|
||||||
pub fn f() -> int { crateresolve4a::g() }
|
pub fn f() -> int { crateresolve4a::g() }
|
||||||
|
|
|
@ -13,6 +13,6 @@
|
||||||
#[crate_id="crateresolve4b#0.2"];
|
#[crate_id="crateresolve4b#0.2"];
|
||||||
#[crate_type = "lib"];
|
#[crate_type = "lib"];
|
||||||
|
|
||||||
extern mod crateresolve4a = "crateresolve4a#0.1";
|
extern crate crateresolve4a = "crateresolve4a#0.1";
|
||||||
|
|
||||||
pub fn g() -> int { crateresolve4a::f() }
|
pub fn g() -> int { crateresolve4a::f() }
|
||||||
|
|
|
@ -14,11 +14,11 @@
|
||||||
|
|
||||||
// These both have the same version but differ in other metadata
|
// These both have the same version but differ in other metadata
|
||||||
pub mod a {
|
pub mod a {
|
||||||
extern mod cr_1 (name = "crateresolve_calories", vers = "0.1", calories="100");
|
extern crate cr_1 (name = "crateresolve_calories", vers = "0.1", calories="100");
|
||||||
pub fn f() -> int { cr_1::f() }
|
pub fn f() -> int { cr_1::f() }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod b {
|
pub mod b {
|
||||||
extern mod cr_2 (name = "crateresolve_calories", vers = "0.1", calories="200");
|
extern crate cr_2 (name = "crateresolve_calories", vers = "0.1", calories="200");
|
||||||
pub fn f() -> int { cr_2::f() }
|
pub fn f() -> int { cr_2::f() }
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,4 +13,4 @@
|
||||||
#[crate_id="b#0.1"];
|
#[crate_id="b#0.1"];
|
||||||
#[crate_type = "lib"];
|
#[crate_type = "lib"];
|
||||||
|
|
||||||
extern mod a;
|
extern crate a;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#[crate_id="issue_2526#0.2"];
|
#[crate_id="issue_2526#0.2"];
|
||||||
#[crate_type = "lib"];
|
#[crate_type = "lib"];
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
struct arc_destruct<T> {
|
struct arc_destruct<T> {
|
||||||
_data: int,
|
_data: int,
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#[crate_id="req"];
|
#[crate_id="req"];
|
||||||
#[crate_type = "lib"];
|
#[crate_type = "lib"];
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::hashmap::HashMap;
|
use std::hashmap::HashMap;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// ignore-fast windows doesn't like extern mod
|
// ignore-fast windows doesn't like extern crate
|
||||||
// aux-build:issue-9906.rs
|
// aux-build:issue-9906.rs
|
||||||
|
|
||||||
pub use other::FooBar;
|
pub use other::FooBar;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#[crate_type = "lib"];
|
#[crate_type = "lib"];
|
||||||
|
|
||||||
extern mod issue2378a;
|
extern crate issue2378a;
|
||||||
|
|
||||||
use issue2378a::maybe;
|
use issue2378a::maybe;
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#[crate_id="c#0.1"];
|
#[crate_id="c#0.1"];
|
||||||
#[crate_type = "lib"];
|
#[crate_type = "lib"];
|
||||||
|
|
||||||
extern mod a;
|
extern crate a;
|
||||||
|
|
||||||
use a::to_strz;
|
use a::to_strz;
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#[allow(unused_imports)];
|
#[allow(unused_imports)];
|
||||||
#[feature(globs)];
|
#[feature(globs)];
|
||||||
|
|
||||||
extern mod issue_2316_a;
|
extern crate issue_2316_a;
|
||||||
|
|
||||||
pub mod cloth {
|
pub mod cloth {
|
||||||
use issue_2316_a::*;
|
use issue_2316_a::*;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#[feature(macro_registrar)];
|
#[feature(macro_registrar)];
|
||||||
|
|
||||||
extern mod syntax;
|
extern crate syntax;
|
||||||
|
|
||||||
use std::any::Any;
|
use std::any::Any;
|
||||||
use std::local_data;
|
use std::local_data;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#[feature(globs, macro_registrar, macro_rules, quote)];
|
#[feature(globs, macro_registrar, macro_rules, quote)];
|
||||||
|
|
||||||
extern mod syntax;
|
extern crate syntax;
|
||||||
|
|
||||||
use syntax::ast::{Name, TokenTree};
|
use syntax::ast::{Name, TokenTree};
|
||||||
use syntax::codemap::Span;
|
use syntax::codemap::Span;
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod pub_use_xcrate1;
|
extern crate pub_use_xcrate1;
|
||||||
|
|
||||||
pub use pub_use_xcrate1::Foo;
|
pub use pub_use_xcrate1::Foo;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
// aux-build:trait_default_method_xc_aux.rs
|
// aux-build:trait_default_method_xc_aux.rs
|
||||||
|
|
||||||
extern mod aux = "trait_default_method_xc_aux";
|
extern crate aux = "trait_default_method_xc_aux";
|
||||||
use aux::A;
|
use aux::A;
|
||||||
|
|
||||||
pub struct a_struct { x: int }
|
pub struct a_struct { x: int }
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
extern mod collections;
|
extern crate collections;
|
||||||
|
|
||||||
use extra::time;
|
use extra::time;
|
||||||
use collections::TreeMap;
|
use collections::TreeMap;
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
extern mod collections;
|
extern crate collections;
|
||||||
|
|
||||||
use collections::bitv::BitvSet;
|
use collections::bitv::BitvSet;
|
||||||
use collections::TreeSet;
|
use collections::TreeSet;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#[feature(macro_rules)];
|
#[feature(macro_rules)];
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use extra::time::precise_time_s;
|
use extra::time::precise_time_s;
|
||||||
use std::mem::swap;
|
use std::mem::swap;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
// different scalability characteristics compared to the select
|
// different scalability characteristics compared to the select
|
||||||
// version.
|
// version.
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use std::comm;
|
use std::comm;
|
||||||
use std::os;
|
use std::os;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
//
|
//
|
||||||
// I *think* it's the same, more or less.
|
// I *think* it's the same, more or less.
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use std::os;
|
use std::os;
|
||||||
use std::task;
|
use std::task;
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
|
|
||||||
// This also serves as a pipes test, because Arcs are implemented with pipes.
|
// This also serves as a pipes test, because Arcs are implemented with pipes.
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
extern mod sync;
|
extern crate sync;
|
||||||
|
|
||||||
use sync::Arc;
|
use sync::Arc;
|
||||||
use sync::MutexArc;
|
use sync::MutexArc;
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
|
|
||||||
// This also serves as a pipes test, because Arcs are implemented with pipes.
|
// This also serves as a pipes test, because Arcs are implemented with pipes.
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
extern mod sync;
|
extern crate sync;
|
||||||
|
|
||||||
use sync::RWArc;
|
use sync::RWArc;
|
||||||
use sync::Future;
|
use sync::Future;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use std::os;
|
use std::os;
|
||||||
use std::uint;
|
use std::uint;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use std::os;
|
use std::os;
|
||||||
use std::uint;
|
use std::uint;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use std::task::spawn;
|
use std::task::spawn;
|
||||||
use std::os;
|
use std::os;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use std::os;
|
use std::os;
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod sync;
|
extern crate sync;
|
||||||
extern mod arena;
|
extern crate arena;
|
||||||
|
|
||||||
use std::iter::range_step;
|
use std::iter::range_step;
|
||||||
use sync::Future;
|
use sync::Future;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
// chameneos
|
// chameneos
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use std::option;
|
use std::option;
|
||||||
use std::os;
|
use std::os;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use std::os;
|
use std::os;
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// ignore-pretty the `let to_child` line gets an extra newline
|
// ignore-pretty the `let to_child` line gets an extra newline
|
||||||
// multi tasking k-nucleotide
|
// multi tasking k-nucleotide
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use std::cmp::Ord;
|
use std::cmp::Ord;
|
||||||
use std::comm;
|
use std::comm;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
// ignore-test
|
// ignore-test
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use std::cast::transmute;
|
use std::cast::transmute;
|
||||||
use std::i32::range;
|
use std::i32::range;
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
extern mod getopts;
|
extern crate getopts;
|
||||||
|
|
||||||
use extra::time;
|
use extra::time;
|
||||||
use std::os;
|
use std::os;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod num;
|
extern crate num;
|
||||||
|
|
||||||
use std::from_str::FromStr;
|
use std::from_str::FromStr;
|
||||||
use std::num::One;
|
use std::num::One;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
// ignore-test arcs no longer unwrap
|
// ignore-test arcs no longer unwrap
|
||||||
|
|
||||||
extern mod sync;
|
extern crate sync;
|
||||||
|
|
||||||
use std::from_str::FromStr;
|
use std::from_str::FromStr;
|
||||||
use std::iter::count;
|
use std::iter::count;
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
// Microbenchmark for the smallintmap library
|
// Microbenchmark for the smallintmap library
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
extern mod collections;
|
extern crate collections;
|
||||||
|
|
||||||
use collections::SmallIntMap;
|
use collections::SmallIntMap;
|
||||||
use std::os;
|
use std::os;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#[feature(managed_boxes)];
|
#[feature(managed_boxes)];
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::io::stdio::StdReader;
|
use std::io::stdio::StdReader;
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
#[feature(managed_boxes)];
|
#[feature(managed_boxes)];
|
||||||
|
|
||||||
extern mod extra;
|
extern crate extra;
|
||||||
extern mod collections;
|
extern crate collections;
|
||||||
|
|
||||||
use collections::list::{List, Cons, Nil};
|
use collections::list::{List, Cons, Nil};
|
||||||
use extra::time::precise_time_s;
|
use extra::time::precise_time_s;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
// ignore-fast aux-build
|
// ignore-fast aux-build
|
||||||
// aux-build:ambig_impl_2_lib.rs
|
// aux-build:ambig_impl_2_lib.rs
|
||||||
extern mod ambig_impl_2_lib;
|
extern crate ambig_impl_2_lib;
|
||||||
use ambig_impl_2_lib::me;
|
use ambig_impl_2_lib::me;
|
||||||
trait me {
|
trait me {
|
||||||
fn me(&self) -> uint;
|
fn me(&self) -> uint;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod sync;
|
extern crate sync;
|
||||||
use sync::RWArc;
|
use sync::RWArc;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// error-pattern: lifetime of return value does not outlive the function call
|
// error-pattern: lifetime of return value does not outlive the function call
|
||||||
extern mod sync;
|
extern crate sync;
|
||||||
use sync::RWArc;
|
use sync::RWArc;
|
||||||
fn main() {
|
fn main() {
|
||||||
let x = ~RWArc::new(1);
|
let x = ~RWArc::new(1);
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod sync;
|
extern crate sync;
|
||||||
use sync::RWArc;
|
use sync::RWArc;
|
||||||
fn main() {
|
fn main() {
|
||||||
let x = ~RWArc::new(1);
|
let x = ~RWArc::new(1);
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern mod sync;
|
extern crate sync;
|
||||||
use sync::RWArc;
|
use sync::RWArc;
|
||||||
fn main() {
|
fn main() {
|
||||||
let x = ~RWArc::new(1);
|
let x = ~RWArc::new(1);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// error-pattern: lifetime of variable does not enclose its declaration
|
// error-pattern: lifetime of variable does not enclose its declaration
|
||||||
extern mod sync;
|
extern crate sync;
|
||||||
use sync::RWArc;
|
use sync::RWArc;
|
||||||
fn main() {
|
fn main() {
|
||||||
let x = ~RWArc::new(1);
|
let x = ~RWArc::new(1);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// error-pattern: lifetime of variable does not enclose its declaration
|
// error-pattern: lifetime of variable does not enclose its declaration
|
||||||
extern mod sync;
|
extern crate sync;
|
||||||
use sync::RWArc;
|
use sync::RWArc;
|
||||||
fn main() {
|
fn main() {
|
||||||
let x = ~RWArc::new(1);
|
let x = ~RWArc::new(1);
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// Test for traits inheriting from the builtin kinds cross-crate.
|
// Test for traits inheriting from the builtin kinds cross-crate.
|
||||||
// Mostly tests correctness of metadata.
|
// Mostly tests correctness of metadata.
|
||||||
|
|
||||||
extern mod trait_superkinds_in_metadata;
|
extern crate trait_superkinds_in_metadata;
|
||||||
use trait_superkinds_in_metadata::{RequiresRequiresFreezeAndSend, RequiresFreeze};
|
use trait_superkinds_in_metadata::{RequiresRequiresFreezeAndSend, RequiresFreeze};
|
||||||
|
|
||||||
struct X<T>(T);
|
struct X<T>(T);
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
// Tests that methods that implement a trait cannot be invoked
|
// Tests that methods that implement a trait cannot be invoked
|
||||||
// unless the trait is imported.
|
// unless the trait is imported.
|
||||||
|
|
||||||
extern mod coherence_inherent_cc_lib;
|
extern crate coherence_inherent_cc_lib;
|
||||||
|
|
||||||
mod Import {
|
mod Import {
|
||||||
// Trait is in scope here:
|
// Trait is in scope here:
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// 'conflicting implementations' error message.
|
// 'conflicting implementations' error message.
|
||||||
|
|
||||||
// aux-build:trait_impl_conflict.rs
|
// aux-build:trait_impl_conflict.rs
|
||||||
extern mod trait_impl_conflict;
|
extern crate trait_impl_conflict;
|
||||||
use trait_impl_conflict::Foo;
|
use trait_impl_conflict::Foo;
|
||||||
|
|
||||||
impl<A> Foo for A {
|
impl<A> Foo for A {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// aux-build:crateresolve1-3.rs
|
// aux-build:crateresolve1-3.rs
|
||||||
// error-pattern:multiple matching crates for `crateresolve1`
|
// error-pattern:multiple matching crates for `crateresolve1`
|
||||||
|
|
||||||
extern mod crateresolve1;
|
extern crate crateresolve1;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
// aux-build:crateresolve2-3.rs
|
// aux-build:crateresolve2-3.rs
|
||||||
// error-pattern:using multiple versions of crate `crateresolve2`
|
// error-pattern:using multiple versions of crate `crateresolve2`
|
||||||
|
|
||||||
extern mod crateresolve2 = "crateresolve2#0.1";
|
extern crate crateresolve2 = "crateresolve2#0.1";
|
||||||
|
|
||||||
mod m {
|
mod m {
|
||||||
pub extern mod crateresolve2 = "crateresolve2#0.2";
|
pub extern crate crateresolve2 = "crateresolve2#0.2";
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
// aux-build:crateresolve5-1.rs
|
// aux-build:crateresolve5-1.rs
|
||||||
// aux-build:crateresolve5-2.rs
|
// aux-build:crateresolve5-2.rs
|
||||||
|
|
||||||
extern mod cr5_1 = "crateresolve5#0.1";
|
extern crate cr5_1 = "crateresolve5#0.1";
|
||||||
extern mod cr5_2 = "crateresolve5#0.2";
|
extern crate cr5_2 = "crateresolve5#0.2";
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue