Skip to content

Commit

Permalink
rustdoc: don't inject "extern crate std;"
Browse files Browse the repository at this point in the history
  • Loading branch information
bombless committed Apr 19, 2015
1 parent b08d6cf commit adc93ce
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 adc93ce

Please sign in to comment.