diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2014-04-12 09:03:16 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2014-04-12 09:03:39 +0530 |
| commit | d0aed0995b6ca50ff0955ccda2e9d98076e9f961 (patch) | |
| tree | 3089efc6a698080be6deeec305e7722a73255c97 /src/doc/tutorial.md | |
| parent | b2b2bbb62893b9655f65cb2813eaaba4f2e742dd (diff) | |
| download | rust-d0aed0995b6ca50ff0955ccda2e9d98076e9f961.tar.gz rust-d0aed0995b6ca50ff0955ccda2e9d98076e9f961.zip | |
Update tutorials to use new attribute syntax (#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 d0463ca17d3..8718f1b791e 100644 --- a/src/doc/tutorial.md +++ b/src/doc/tutorial.md @@ -3094,8 +3094,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() {} @@ -3119,8 +3119,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)] @@ -3135,7 +3135,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" } @@ -3209,12 +3209,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. |
