1
Fork 0

Do not ICE when we have -Zunpretty=expand with invalid ABI

This commit is contained in:
Michael Goulet 2022-07-16 20:35:54 -07:00
parent d5e7f4782e
commit 26ecd44160
5 changed files with 33 additions and 6 deletions

View file

@ -274,10 +274,12 @@ impl<'a> PostExpansionVisitor<'a> {
);
}
abi => {
self.sess.parse_sess.span_diagnostic.delay_span_bug(
span,
&format!("unrecognized ABI not caught in lowering: {}", abi),
);
if self.sess.opts.pretty.map_or(true, |ppm| ppm.needs_hir()) {
self.sess.parse_sess.span_diagnostic.delay_span_bug(
span,
&format!("unrecognized ABI not caught in lowering: {}", abi),
);
}
}
}
}