Uh oh!
There was an error while loading. Please reload this page.
Do not ICE when we have -Zunpretty=expanded with invalid ABI - #99360
Conversation
rust-highfive
commented
Jul 17, 2022
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.
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.
Per the reference there should be no ast-level constraint for abi. I think it is fine to leave it as is in ast.
fee1-dead
commented
Jul 17, 2022
@bors r+ |
bors
commented
Jul 17, 2022
…-dead Do not ICE when we have `-Zunpretty=expanded` with invalid ABI Fixesrust-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
Remove unused `PpMode::needs_hir` This method was added in rust-lang#99360 to avoid an overzealous `span_delayed_bug` ICE in specific circumstances, but the only caller was subsequently removed in rust-lang#136603, which presumably avoids the problem in a more principled way.
Remove unused `PpMode::needs_hir` This method was added in rust-lang#99360 to avoid an overzealous `span_delayed_bug` ICE in specific circumstances, but the only caller was subsequently removed in rust-lang#136603, which presumably avoids the problem in a more principled way.
Remove unused `PpMode::needs_hir` This method was added in rust-lang#99360 to avoid an overzealous `span_delayed_bug` ICE in specific circumstances, but the only caller was subsequently removed in rust-lang#136603, which presumably avoids the problem in a more principled way.
Remove unused `PpMode::needs_hir` This method was added in rust-lang#99360 to avoid an overzealous `span_delayed_bug` ICE in specific circumstances, but the only caller was subsequently removed in rust-lang#136603, which presumably avoids the problem in a more principled way.
Remove unused `PpMode::needs_hir` This method was added in rust-lang#99360 to avoid an overzealous `span_delayed_bug` ICE in specific circumstances, but the only caller was subsequently removed in rust-lang#136603, which presumably avoids the problem in a more principled way.
Rollup merge of rust-lang#137975 - Zalathar:needs-hir, r=compiler-errors Remove unused `PpMode::needs_hir` This method was added in rust-lang#99360 to avoid an overzealous `span_delayed_bug` ICE in specific circumstances, but the only caller was subsequently removed in rust-lang#136603, which presumably avoids the problem in a more principled way.
Fixes#99331