diff options
| author | bors <bors@rust-lang.org> | 2014-04-14 07:11:53 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-04-14 07:11:53 -0700 |
| commit | e2e754810c78a25c902b76c74ba8f04d0dcdc6f1 (patch) | |
| tree | a1995e5d93897e4fcc0a5d8c141e891d7766e58d /src/doc/tutorial.md | |
| parent | 5dd94d86c64eb13382b3230c9a22c1e59d1e361a (diff) | |
| parent | d0aed0995b6ca50ff0955ccda2e9d98076e9f961 (diff) | |
| download | rust-e2e754810c78a25c902b76c74ba8f04d0dcdc6f1.tar.gz rust-e2e754810c78a25c902b76c74ba8f04d0dcdc6f1.zip | |
auto merge of #13477 : Manishearth/rust/newattr, r=brson
See #13476
Diffstat (limited to 'src/doc/tutorial.md')
| -rw-r--r-- | src/doc/tutorial.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md index a0a012ef69b..b52e1abc1a3 100644 --- a/src/doc/tutorial.md +++ b/src/doc/tutorial.md @@ -3096,8 +3096,8 @@ Therefore, if you plan to compile your crate as a library, you should annotate i ~~~~ // `lib.rs` -# #[crate_type = "lib"]; -#[crate_id = "farm#2.5"]; +# #![crate_type = "lib"] +#![crate_id = "farm#2.5"] // ... # fn farm() {} @@ -3121,8 +3121,8 @@ or setting the crate type (library or executable) explicitly: // ... // This crate is a library ("bin" is the default) -#[crate_id = "farm#2.5"]; -#[crate_type = "lib"]; +#![crate_id = "farm#2.5"] +#![crate_type = "lib"] // Turn on a warning #[warn(non_camel_case_types)] @@ -3137,7 +3137,7 @@ We define two crates, and use one of them as a library in the other. ~~~~ // `world.rs` -#[crate_id = "world#0.42"]; +#![crate_id = "world#0.42"] # mod secret_module_to_make_this_test_run { pub fn explore() -> &'static str { "world" } @@ -3211,12 +3211,12 @@ Both auto-insertions can be disabled with an attribute if necessary: ~~~ // In the crate root: -#[no_std]; +#![no_std] ~~~ ~~~ // In any module: -#[no_implicit_prelude]; +#![no_implicit_prelude] ~~~ See the [API documentation][stddoc] for details. |
