Always evaluate free constants and statics, even if previous errors occurred

This commit is contained in:
Oli Scherer 2024-02-14 12:28:07 +00:00
parent e29a1530f6
commit 9062697917
69 changed files with 650 additions and 519 deletions

View file

@ -249,7 +249,7 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
let secondary_errors = mem::take(&mut self.secondary_errors);
if self.error_emitted.is_none() {
for error in secondary_errors {
error.emit();
self.error_emitted = Some(error.emit());
}
} else {
assert!(self.tcx.dcx().has_errors().is_some());