Skip to content
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

Don't ICE on unsized extern "rust-call" call #111885

Merged
merged 2 commits into from Jun 13, 2023

Conversation

compiler-errors
Copy link
Member

Conceptually builds on #111864, but doesn't depend on it.

@rustbot
Copy link
Collaborator

rustbot commented May 23, 2023

r? @davidtwco

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 23, 2023
#![feature(unboxed_closures)]
#![feature(unsized_fn_params)]

fn bad() -> extern "rust-call" fn(([u8],)) { todo!() }
Copy link
Member

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.

Copy link
Member Author

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.

@compiler-errors
Copy link
Member Author

r? compiler

@rustbot rustbot assigned eholk and unassigned davidtwco Jun 6, 2023
@est31
Copy link
Member

est31 commented Jun 6, 2023

@compiler-errors you are aware that there are merge conflicts?

@compiler-errors
Copy link
Member Author

@est31: shouldn't affect the reviewability of this PR, but thanks, I'll rebase it soon I guess.

@eholk
Copy link
Contributor

eholk commented Jun 13, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Jun 13, 2023

📌 Commit b95ea45 has been approved by eholk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 13, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 13, 2023
…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
@bors bors merged commit b7706e8 into rust-lang:master Jun 13, 2023
11 checks passed
@rustbot rustbot added this to the 1.72.0 milestone Jun 13, 2023
@compiler-errors compiler-errors deleted the rust-call-abi-sized branch August 11, 2023 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants