Skip to content

Commit 6d6e288

Browse files
committed
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. :(
1 parent 3c4ff1b commit 6d6e288

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/doc/tutorial.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3143,12 +3143,13 @@ Now for something that you can actually compile yourself.
31433143

31443144
We define two crates, and use one of them as a library in the other.
31453145

3146-
~~~~{.ignore}
3146+
~~~~
31473147
// `world.rs`
31483148
#[crate_id = "world#0.42"];
3149-
# extern crate extra;
3149+
3150+
# mod secret_module_to_make_this_test_run {
31503151
pub fn explore() -> &'static str { "world" }
3151-
# fn main() {}
3152+
# }
31523153
~~~~
31533154

31543155
~~~~ {.ignore}

0 commit comments

Comments
 (0)