1
Fork 0

Fix for_loops_over_fallibles hits in compiletest/src/json.rs

This commit is contained in:
zachs18 2024-05-16 05:51:29 +00:00 committed by GitHub
parent 376a8c0ae5
commit a59d071e9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -282,7 +282,7 @@ fn push_expected_errors(
// Add notes for the backtrace // Add notes for the backtrace
for span in primary_spans { for span in primary_spans {
for frame in &span.expansion { if let Some(frame) = &span.expansion {
push_backtrace(expected_errors, frame, file_name); push_backtrace(expected_errors, frame, file_name);
} }
} }
@ -315,7 +315,7 @@ fn push_backtrace(
}); });
} }
for previous_expansion in &expansion.span.expansion { if let Some(previous_expansion) = &expansion.span.expansion {
push_backtrace(expected_errors, previous_expansion, file_name); push_backtrace(expected_errors, previous_expansion, file_name);
} }
} }