@@ -8,7 +8,7 @@ use crate::lint::{
88} ;
99use rustc_ast:: node_id:: NodeId ;
1010use rustc_data_structures:: fx:: { FxHashMap , FxHashSet , FxIndexSet } ;
11- use rustc_data_structures:: sync:: { Lock , Lrc } ;
11+ use rustc_data_structures:: sync:: { AtomicBool , Lock , Lrc } ;
1212use rustc_errors:: { emitter:: SilentEmitter , ColorConfig , Handler } ;
1313use rustc_errors:: {
1414 fallback_fluent_bundle, Diagnostic , DiagnosticBuilder , DiagnosticId , DiagnosticMessage ,
@@ -208,7 +208,7 @@ pub struct ParseSess {
208208 pub gated_spans : GatedSpans ,
209209 pub symbol_gallery : SymbolGallery ,
210210 /// The parser has reached `Eof` due to an unclosed brace. Used to silence unnecessary errors.
211- pub reached_eof : Lock < bool > ,
211+ pub reached_eof : AtomicBool ,
212212 /// Environment variables accessed during the build and their values when they exist.
213213 pub env_depinfo : Lock < FxHashSet < ( Symbol , Option < Symbol > ) > > ,
214214 /// File paths accessed during the build.
@@ -254,7 +254,7 @@ impl ParseSess {
254254 ambiguous_block_expr_parse : Lock :: new ( FxHashMap :: default ( ) ) ,
255255 gated_spans : GatedSpans :: default ( ) ,
256256 symbol_gallery : SymbolGallery :: default ( ) ,
257- reached_eof : Lock :: new ( false ) ,
257+ reached_eof : AtomicBool :: new ( false ) ,
258258 env_depinfo : Default :: default ( ) ,
259259 file_depinfo : Default :: default ( ) ,
260260 type_ascription_path_suggestions : Default :: default ( ) ,
0 commit comments