Skip to content

Commit

Permalink
Auto merge of #24597 - bombless:doc, r=steveklabnik
Browse files Browse the repository at this point in the history
This patch will make links like http://doc.rust-lang.org/std/collections/struct.BTreeMap.html#examples actually playable without modifying the code.

It seems that this patch cannot be tested on test/rustdoc.

And I suggest adding a `&run=1` to those links.

Thank @jorisgio for noticing me this!

r? @steveklabnik 

Closes #24332
  • Loading branch information
bors committed Apr 20, 2015
2 parents be9a72b + adc93ce commit e959fab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ pub fn maketest(s: &str, cratename: Option<&str>, dont_insert_main: bool,

// Don't inject `extern crate std` because it's already injected by the
// compiler.
if !s.contains("extern crate") && !opts.no_crate_inject {
if !s.contains("extern crate") && !opts.no_crate_inject && cratename != Some("std") {
match cratename {
Some(cratename) => {
if s.contains(cratename) {
Expand Down

0 comments on commit e959fab

Please sign in to comment.