From 7edd1d8799aff9d4dfea72e37c500ec8fdb0afb8 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 14 Mar 2023 12:16:19 +0000 Subject: Replace another lock with an append-only vec --- compiler/rustc_session/src/parse.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_session/src') diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index d80911747f3..61ce9291040 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -194,7 +194,7 @@ pub struct ParseSess { pub edition: Edition, /// Places where raw identifiers were used. This is used to avoid complaining about idents /// clashing with keywords in new editions. - pub raw_identifier_spans: Lock>, + pub raw_identifier_spans: AppendOnlyVec, /// Places where identifiers that contain invalid Unicode codepoints but that look like they /// should be. Useful to avoid bad tokenization when encountering emoji. We group them to /// provide a single error per unique incorrect identifier. @@ -247,7 +247,7 @@ impl ParseSess { config: FxIndexSet::default(), check_config: CrateCheckConfig::default(), edition: ExpnId::root().expn_data().edition, - raw_identifier_spans: Lock::new(Vec::new()), + raw_identifier_spans: Default::default(), bad_unicode_identifiers: Lock::new(Default::default()), source_map, buffered_lints: Lock::new(vec![]), -- cgit 1.4.1-3-g733a5