Skip to content

Commit d9f7005

Browse files
committed
Allow overwriting ExpnId for concurrent decoding
1 parent d06ca0f commit d9f7005

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_span/src/hygiene.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1277,11 +1277,11 @@ pub fn register_expn_id(
12771277
let expn_id = ExpnId { krate, local_id };
12781278
HygieneData::with(|hygiene_data| {
12791279
let _old_data = hygiene_data.foreign_expn_data.insert(expn_id, data);
1280-
debug_assert!(_old_data.is_none());
1280+
debug_assert!(_old_data.is_none() || cfg!(parallel_compiler));
12811281
let _old_hash = hygiene_data.foreign_expn_hashes.insert(expn_id, hash);
1282-
debug_assert!(_old_hash.is_none());
1282+
debug_assert!(_old_hash.is_none() || cfg!(parallel_compiler));
12831283
let _old_id = hygiene_data.expn_hash_to_expn_id.insert(hash, expn_id);
1284-
debug_assert!(_old_id.is_none());
1284+
debug_assert!(_old_id.is_none() || cfg!(parallel_compiler));
12851285
});
12861286
expn_id
12871287
}

0 commit comments

Comments
 (0)