about summary refs log tree commit diff
path: root/src/doc/tutorial.md
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-03-09 12:50:45 +1100
committerHuon Wilson <dbau.pp+github@gmail.com>2014-03-09 19:34:40 +1100
commit6d6e2880d2f1b3e00d28957a5e6f540fcfda2556 (patch)
tree7f929e33260ae7191bf5b04179666baca51c1d04 /src/doc/tutorial.md
parent3c4ff1b872e1d1fd4e905f9a9ac3aeec5397608d (diff)
downloadrust-6d6e2880d2f1b3e00d28957a5e6f540fcfda2556.tar.gz
rust-6d6e2880d2f1b3e00d28957a5e6f540fcfda2556.zip
tutorial: hack a code snippet to make it compile.
This is meant to be compiling a crate, but the crate_id attribute seems
to be upsetting it if the attribute is actually on the crate. I.e. this
makes this test compile by putting the crate_id attribute on a function
and so it's ignored. Such a hack. :(
Diffstat (limited to 'src/doc/tutorial.md')
-rw-r--r--src/doc/tutorial.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md
index 476cc26fe67..d103b9356d9 100644
--- a/src/doc/tutorial.md
+++ b/src/doc/tutorial.md
@@ -3143,12 +3143,13 @@ Now for something that you can actually compile yourself.
 
 We define two crates, and use one of them as a library in the other.
 
-~~~~{.ignore}
+~~~~
 // `world.rs`
 #[crate_id = "world#0.42"];
-# extern crate extra;
+
+# mod secret_module_to_make_this_test_run {
 pub fn explore() -> &'static str { "world" }
-# fn main() {}
+# }
 ~~~~
 
 ~~~~ {.ignore}