Skip to content

Conversation

@Jules-Bertholet
Copy link
Contributor

@Jules-Bertholet Jules-Bertholet commented May 23, 2023

The rust-call ABI isn't compatible with #![feature(unsized_fn_params)], so trying to use that feature with closures leads to an ICE (#67981). This turns that ICE into a type-check error.

@rustbot label A-closures F-unsized_fn_params

@rustbot
Copy link
Collaborator

rustbot commented May 23, 2023

r? @spastorino

(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
@rustbot rustbot added F-unsized_fn_params `#![feature(unsized_fn_params)]` A-closures Area: Closures (`|…| { … }`) labels May 23, 2023
@compiler-errors
Copy link
Member

Can you test more combinations, like Fn<([u8],)> obligations with the (desugared) fn trait?

@compiler-errors
Copy link
Member

compiler-errors commented May 23, 2023

Squash this into one commit, please, then I can approve.

The `rust-call` ABI isn't compatible with
`#![feature(unsized_fn_params)]`, so trying to use that feature with
closures leads to an ICE (rust-lang#67981). This turns that ICE into a
type-check error.
@Jules-Bertholet
Copy link
Contributor Author

Done

@compiler-errors
Copy link
Member

Lol, sorry, mistakenly mixed up two examples and thought it still ICEd.

Anywho, if I do find some way of triggering another ICE like this with just fn pointers I'll just open another issue.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 23, 2023

📌 Commit 5cd02ea has been approved by compiler-errors

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 May 23, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request May 24, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#111861 (Don't ICE on return-type notation when promoting trait preds to associated type bounds)
 - rust-lang#111864 (Always require closure parameters to be `Sized`)
 - rust-lang#111870 (Rename `traits_in_crate` query to `traits`)
 - rust-lang#111880 (Don't ICE when computing PointerLike trait when region vars are in param-env)
 - rust-lang#111887 (Add regression tests for pretty-printing inherent projections)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit efea88a into rust-lang:master May 24, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 24, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 13, 2023
…d, r=eholk

Don't ICE on unsized `extern "rust-call"` call

Conceptually builds on rust-lang#111864, but doesn't depend on it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-closures Area: Closures (`|…| { … }`) F-unsized_fn_params `#![feature(unsized_fn_params)]` 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.

5 participants