Skip to content

Commit 9d33abd

Browse files
authored
Rollup merge of #82155 - tmiasko:once, r=matthewjasper
Use !Sync std::lazy::OnceCell in usefulness checking The `rustc_data_structures::sync::OnceCell` is thread-safe when building a parallel compiler. This is unnecessary for the purposes of pattern usefulness checking. Use `!Sync` `std::lazy::OnceCell` instead.
2 parents 0c25d15 + 64b5b75 commit 9d33abd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_mir_build/src/thir/pattern/usefulness.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ use super::{PatternFoldable, PatternFolder};
289289

290290
use rustc_data_structures::captures::Captures;
291291
use rustc_data_structures::fx::FxHashMap;
292-
use rustc_data_structures::sync::OnceCell;
293292

294293
use rustc_arena::TypedArena;
295294
use rustc_hir::def_id::DefId;
@@ -300,6 +299,7 @@ use rustc_span::Span;
300299
use smallvec::{smallvec, SmallVec};
301300
use std::fmt;
302301
use std::iter::{FromIterator, IntoIterator};
302+
use std::lazy::OnceCell;
303303

304304
crate struct MatchCheckCtxt<'a, 'tcx> {
305305
crate tcx: TyCtxt<'tcx>,

0 commit comments

Comments
 (0)