Skip to content

Commit a0f4e78

Browse files
Remove lazy_static dependency
1 parent 6df1d82 commit a0f4e78

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/librustdoc/core.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ use rustc_span::symbol::sym;
2525
use rustc_span::Span;
2626

2727
use std::cell::RefCell;
28+
use std::lazy::SyncLazy;
2829
use std::mem;
2930
use std::rc::Rc;
3031

@@ -271,9 +272,8 @@ crate fn create_config(
271272
providers.typeck_item_bodies = |_, _| {};
272273
// hack so that `used_trait_imports` won't try to call typeck
273274
providers.used_trait_imports = |_, _| {
274-
lazy_static! {
275-
static ref EMPTY_SET: FxHashSet<LocalDefId> = FxHashSet::default();
276-
}
275+
static EMPTY_SET: SyncLazy<FxHashSet<LocalDefId>> =
276+
SyncLazy::new(FxHashSet::default);
277277
&EMPTY_SET
278278
};
279279
// In case typeck does end up being called, don't ICE in case there were name resolution errors

src/librustdoc/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#![recursion_limit = "256"]
1919
#![warn(rustc::internal)]
2020

21-
#[macro_use]
22-
extern crate lazy_static;
2321
#[macro_use]
2422
extern crate tracing;
2523

0 commit comments

Comments
 (0)