rustdoc: don't inject "extern crate std;"
This commit is contained in:
parent
b08d6cf529
commit
adc93ceac9
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user