diff options
| -rw-r--r-- | src/librustdoc/core.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index a77b177bd28..f433c78890f 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -364,9 +364,6 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt ..Options::default() }; - lazy_static! { - static ref EMPTY_MAP: FxHashSet<LocalDefId> = FxHashSet::default(); - } let config = interface::Config { opts: sessopts, crate_cfg: interface::parse_cfgspecs(cfgs), @@ -381,12 +378,15 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt lint_caps, register_lints: None, override_queries: Some(|_sess, local_providers, external_providers| { + lazy_static! { + static ref EMPTY_SET: FxHashSet<LocalDefId> = FxHashSet::default(); + } // Most lints will require typechecking, so just don't run them. local_providers.lint_mod = |_, _| {}; external_providers.lint_mod = |_, _| {}; local_providers.typeck_item_bodies = |_, _| {}; // hack so that `used_trait_imports` won't try to call typeck_tables_of - local_providers.used_trait_imports = |_, _| &EMPTY_MAP; + local_providers.used_trait_imports = |_, _| &EMPTY_SET; // In case typeck does end up being called, don't ICE in case there were name resolution errors local_providers.typeck_tables_of = move |tcx, def_id| { // Closures' tables come from their outermost function, |
