-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Always require closure parameters to be Sized
#111864
Conversation
r? @spastorino (rustbot has picked a reviewer for you, use r? to override) |
397f6ee
to
d925496
Compare
compiler/rustc_trait_selection/src/traits/select/confirmation.rs
Outdated
Show resolved
Hide resolved
Can you test more combinations, like |
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.
e7f2c0a
to
5cd02ea
Compare
Done |
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 |
…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
…d, r=eholk Don't ICE on unsized `extern "rust-call"` call Conceptually builds on rust-lang#111864, but doesn't depend on it.
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