mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 21:47:15 +03:00
Fix duplicate allocation printing.
This commit is contained in:
+1
-1
@@ -200,7 +200,7 @@ pub(super) fn const_to_value(&mut self, const_val: &ConstVal) -> EvalResult<'tcx
|
||||
Struct(_) => unimplemented!(),
|
||||
Tuple(_) => unimplemented!(),
|
||||
Function(_) => unimplemented!(),
|
||||
Array(_) => unimplemented!(),
|
||||
Array(_) => unimplemented!(),
|
||||
Repeat(_, _) => unimplemented!(),
|
||||
};
|
||||
|
||||
|
||||
+1
-2
@@ -411,7 +411,6 @@ pub fn dump_allocs(&self, mut allocs: Vec<AllocId>) {
|
||||
let mut allocs_seen = HashSet::new();
|
||||
|
||||
while let Some(id) = allocs_to_print.pop_front() {
|
||||
allocs_seen.insert(id);
|
||||
if id == ZST_ALLOC_ID || id == NEVER_ALLOC_ID { continue; }
|
||||
let mut msg = format!("Alloc {:<5} ", format!("{}:", id));
|
||||
let prefix_len = msg.len();
|
||||
@@ -433,7 +432,7 @@ pub fn dump_allocs(&self, mut allocs: Vec<AllocId>) {
|
||||
|
||||
for i in 0..(alloc.bytes.len() as u64) {
|
||||
if let Some(&target_id) = alloc.relocations.get(&i) {
|
||||
if !allocs_seen.contains(&target_id) {
|
||||
if allocs_seen.insert(target_id) {
|
||||
allocs_to_print.push_back(target_id);
|
||||
}
|
||||
relocations.push((i, target_id));
|
||||
|
||||
Reference in New Issue
Block a user