-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Display more informative ICE #67986
Display more informative ICE #67986
Conversation
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
src/librustc/ty/layout.rs
Outdated
@@ -2504,7 +2504,7 @@ where | |||
}; | |||
|
|||
let mut inputs = sig.inputs(); | |||
let extra_args = if sig.abi == RustCall { | |||
let extra_args = if sig.abi == RustCall && !sig.inputs().is_empty() { |
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.
This is just ignoring the error. We should be hitting the bug!
below if we don't have any arguments. You just need to make the match more resilient.
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.
So, we should emit ICE like this instead of current one?
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.
Yes: the ICE with the error message is more informative and due to unboxed_closures
being an unfinished feature. (So there's no need to add a test for this feature, as it's expected to ICE.)
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.
Got it, fixed and removed test. Shouldn't we close that issue via this PR?
561761d
to
c524f3c
Compare
@bors r+ rollup |
📌 Commit c524f3c has been approved by |
Display more informative ICE Fixes rust-lang#66696
Rollup of 12 pull requests Successful merges: - #67630 (Treat extern statics just like statics in the "const pointer to static" representation) - #67747 (Explain that associated types and consts can't be accessed directly on the trait's path) - #67884 (Fix incremental builds of core by allowing unused attribute.) - #67966 (Use matches macro in libcore and libstd) - #67979 (Move `intravisit` => `rustc_hir` + misc cleanup) - #67986 (Display more informative ICE) - #67990 (slice patterns: harden match-based borrowck tests) - #68005 (Improve E0184 explanation) - #68009 (Spell check librustc_error_codes) - #68023 (Fix issue #68008) - #68024 (Remove `-Z continue-parse-after-error`) - #68026 (Small improvements in lexical_region_resolve) Failed merges: r? @ghost
Fixes #66696