diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-03-14 12:16:19 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-04-04 09:01:44 +0000 |
| commit | 7edd1d8799aff9d4dfea72e37c500ec8fdb0afb8 (patch) | |
| tree | 68afca411d2e137474785cfc7e792d4086f22d1e /compiler/rustc_session/src/parse.rs | |
| parent | 46996326377b100fa461b49b5be0c91a075f55e5 (diff) | |
| download | rust-7edd1d8799aff9d4dfea72e37c500ec8fdb0afb8.tar.gz rust-7edd1d8799aff9d4dfea72e37c500ec8fdb0afb8.zip | |
Replace another lock with an append-only vec
Diffstat (limited to 'compiler/rustc_session/src/parse.rs')
| -rw-r--r-- | compiler/rustc_session/src/parse.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<Vec<Span>>, + pub raw_identifier_spans: AppendOnlyVec<Span>, /// 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![]), |
