-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not ICE when we have -Zunpretty=expanded
with invalid ABI
#99360
Conversation
r? @fee1-dead (rust-highfive has picked a reviewer for you, use r? to override) |
&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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Do we want to error when we have an invalid ABI and we don't go thru HIR lowering, like with -Zunpretty=expanded
?
Since we're not going thru HIR lowering, we don't emit the error at the normal place we expect it, but if we want, we could emit an error instead of delaying an error here, depending on the pretty print mode.
Right now this just allows invalid ABI strings, but I have no strong opinions either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the reference there should be no ast-level constraint for abi. I think it is fine to leave it as is in ast.
@bors r+ |
…-dead Do not ICE when we have `-Zunpretty=expanded` with invalid ABI Fixes rust-lang#99331
Rollup of 6 pull requests Successful merges: - rust-lang#98383 (Remove restrictions on compare-exchange memory ordering.) - rust-lang#99350 (Be more precise when suggesting removal of parens on unit ctor) - rust-lang#99356 (Do not constraint TAITs when checking impl/trait item compatibility) - rust-lang#99360 (Do not ICE when we have `-Zunpretty=expanded` with invalid ABI) - rust-lang#99373 (Fix source code sidebar tree auto-expand) - rust-lang#99374 (Fix doc for `rchunks_exact`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #99331