Remove lazy_static dependency

This commit is contained in:
Guillaume Gomez 2021-09-29 17:20:52 +02:00
parent 6df1d82869
commit a0f4e783fc
2 changed files with 3 additions and 5 deletions

View file

@ -25,6 +25,7 @@ use rustc_span::symbol::sym;
use rustc_span::Span;
use std::cell::RefCell;
use std::lazy::SyncLazy;
use std::mem;
use std::rc::Rc;
@ -271,9 +272,8 @@ crate fn create_config(
providers.typeck_item_bodies = |_, _| {};
// hack so that `used_trait_imports` won't try to call typeck
providers.used_trait_imports = |_, _| {
lazy_static! {
static ref EMPTY_SET: FxHashSet<LocalDefId> = FxHashSet::default();
}
static EMPTY_SET: SyncLazy<FxHashSet<LocalDefId>> =
SyncLazy::new(FxHashSet::default);
&EMPTY_SET
};
// In case typeck does end up being called, don't ICE in case there were name resolution errors

View file

@ -18,8 +18,6 @@
#![recursion_limit = "256"]
#![warn(rustc::internal)]
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate tracing;