From f7f9a6c1356dbc79394fbf93d485d6d8b44db380 Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Mon, 14 Sep 2020 22:03:54 -0400 Subject: [PATCH] Add a comment why `extern crate` is necessary for rustdoc --- src/librustdoc/lib.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 73a783d5406..94e51d91b54 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -16,6 +16,12 @@ #[macro_use] extern crate lazy_static; +#[macro_use] +extern crate tracing; + +// N.B. these need `extern crate` even in 2018 edition +// because they're loaded implicitly from the sysroot. +// Dependencies listed in Cargo.toml do not need extern crate. extern crate rustc_ast; extern crate rustc_ast_pretty; extern crate rustc_attr; @@ -42,8 +48,6 @@ extern crate rustc_trait_selection; extern crate rustc_typeck; extern crate test as testing; -#[macro_use] -extern crate tracing; use std::default::Default; use std::env; -- 2.44.0