Skip to content

Commit f7f9a6c

Browse files
committed
Add a comment why extern crate is necessary for rustdoc
1 parent 7402a39 commit f7f9a6c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/librustdoc/lib.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616

1717
#[macro_use]
1818
extern crate lazy_static;
19+
#[macro_use]
20+
extern crate tracing;
21+
22+
// N.B. these need `extern crate` even in 2018 edition
23+
// because they're loaded implicitly from the sysroot.
24+
// Dependencies listed in Cargo.toml do not need extern crate.
1925
extern crate rustc_ast;
2026
extern crate rustc_ast_pretty;
2127
extern crate rustc_attr;
@@ -42,8 +48,6 @@ extern crate rustc_target;
4248
extern crate rustc_trait_selection;
4349
extern crate rustc_typeck;
4450
extern crate test as testing;
45-
#[macro_use]
46-
extern crate tracing;
4751

4852
use std::default::Default;
4953
use std::env;

0 commit comments

Comments
 (0)