Skip to content

Commit

Permalink
tutorial: hack a code snippet to make it compile.
Browse files Browse the repository at this point in the history
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. :(
  • Loading branch information
huonw committed Mar 9, 2014
1 parent 3c4ff1b commit 6d6e288
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 6d6e288

Please sign in to comment.