diff --git a/crates/cargo-test-support/src/compare.rs b/crates/cargo-test-support/src/compare.rs index b9194fcd0f1..7ebb330f8ce 100644 --- a/crates/cargo-test-support/src/compare.rs +++ b/crates/cargo-test-support/src/compare.rs @@ -596,18 +596,6 @@ fn find_json_mismatch_r<'a>( let mut expected_entries = l.iter(); let mut actual_entries = r.iter(); - // Compilers older than 1.76 do not produce $message_type. - // Treat it as optional for now. - let mut expected_entries_without_message_type; - let expected_entries: &mut dyn Iterator = - if l.contains_key("$message_type") && !r.contains_key("$message_type") { - expected_entries_without_message_type = - expected_entries.filter(|entry| entry.0 != "$message_type"); - &mut expected_entries_without_message_type - } else { - &mut expected_entries - }; - loop { match (expected_entries.next(), actual_entries.next()) { (None, None) => return None,