mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-19 19:23:10 +00:00
Rollup merge of #89366 - GuillaumeGomez:remove-lazy-static, r=jyn514
rustdoc: Remove lazy_static dependency The macro was used in only one place and there are equivalents in the std, so it seemed weird to keep it around... I think running a perf check would be a good idea though, just in case. r? ``@jyn514``
This commit is contained in:
commit
9a77b21114
@ -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
|
||||
|
@ -18,8 +18,6 @@
|
||||
#![recursion_limit = "256"]
|
||||
#![warn(rustc::internal)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user