Skip to content

Commit bc333db

Browse files
committed
Remove leading underscore.
1 parent 4f5db2c commit bc333db

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

compiler/rustc_span/src/hygiene.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ impl LocalExpnId {
204204
let expn_id = data.local_expn_data.push(Some(expn_data));
205205
let _eid = data.local_expn_hashes.push(expn_hash);
206206
debug_assert_eq!(expn_id, _eid);
207-
let _old_id = data.expn_hash_to_expn_id.insert(expn_hash, expn_id.to_expn_id());
208-
if !_old_id.is_none() {
207+
let old_id = data.expn_hash_to_expn_id.insert(expn_hash, expn_id.to_expn_id());
208+
if old_id.is_some() {
209209
panic!("Hash collision while creating expansion. Cannot continue.");
210210
}
211211
expn_id
@@ -229,8 +229,8 @@ impl LocalExpnId {
229229
*old_expn_data = Some(expn_data);
230230
debug_assert_eq!(data.local_expn_hashes[self].0, Fingerprint::ZERO);
231231
data.local_expn_hashes[self] = expn_hash;
232-
let _old_id = data.expn_hash_to_expn_id.insert(expn_hash, self.to_expn_id());
233-
if !_old_id.is_none() {
232+
let old_id = data.expn_hash_to_expn_id.insert(expn_hash, self.to_expn_id());
233+
if old_id.is_some() {
234234
panic!("Hash collision while creating expansion. Cannot continue.");
235235
}
236236
});
@@ -1266,8 +1266,8 @@ pub fn register_local_expn_id(data: ExpnData, hash: ExpnHash) -> ExpnId {
12661266

12671267
let expn_id = expn_id.to_expn_id();
12681268

1269-
let _old_id = hygiene_data.expn_hash_to_expn_id.insert(hash, expn_id);
1270-
if !_old_id.is_none() {
1269+
let old_id = hygiene_data.expn_hash_to_expn_id.insert(hash, expn_id);
1270+
if old_id.is_some() {
12711271
panic!("Hash collision while creating expansion. Cannot continue.");
12721272
}
12731273
expn_id
@@ -1288,8 +1288,8 @@ pub fn register_expn_id(
12881288
debug_assert!(_old_data.is_none());
12891289
let _old_hash = hygiene_data.foreign_expn_hashes.insert(expn_id, hash);
12901290
debug_assert!(_old_hash.is_none());
1291-
let _old_id = hygiene_data.expn_hash_to_expn_id.insert(hash, expn_id);
1292-
if !_old_id.is_none() {
1291+
let old_id = hygiene_data.expn_hash_to_expn_id.insert(hash, expn_id);
1292+
if old_id.is_some() {
12931293
panic!("Hash collision while creating expansion. Cannot continue.");
12941294
}
12951295
});

0 commit comments

Comments
 (0)