From 6d6e2880d2f1b3e00d28957a5e6f540fcfda2556 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Sun, 9 Mar 2014 12:50:45 +1100 Subject: 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. :( --- src/doc/tutorial.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/doc/tutorial.md') 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} -- cgit 1.4.1-3-g733a5