-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Don't ICE on unsized extern "rust-call"
call
#111885
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
Conversation
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
#![feature(unboxed_closures)] | ||
#![feature(unsized_fn_params)] | ||
|
||
fn bad() -> extern "rust-call" fn(([u8],)) { todo!() } |
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.
I wonder if one should still allow declaring the function. A case could be made for functions with generics as you could call them with a sized type parameter, but if we know that the type is unsized maybe we could error? Or maybe it should be a lint instead? IDK.
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.
Yeah, I don't know if we could make this a well-formedness check. Maybe a lint, yeah.
r? compiler |
@compiler-errors you are aware that there are merge conflicts? |
@est31: shouldn't affect the reviewability of this PR, but thanks, I'll rebase it soon I guess. |
4fd27e5
to
b95ea45
Compare
@bors r+ |
…iaskrgr Rollup of 2 pull requests Successful merges: - rust-lang#111885 (Don't ICE on unsized `extern "rust-call"` call) - rust-lang#112558 (Fix typo in mod.rs) r? `@ghost` `@rustbot` modify labels: rollup
Conceptually builds on #111864, but doesn't depend on it.