-
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
ICE in unsized fn params: tried to statically allocate unsized place #67981
Comments
update, #![feature(unsized_locals, raw_ref_op)]
fn main() {
let f: fn([u8]) = |_| {};
} seems already enough to cause the ICE |
Triage: This now occurs on |
…ywiser Nicer ICE for rust-lang#67981 Provides a slightly nicer ICE for rust-lang#67981, documenting the problem. A proper fix will be necessary before `#![feature(unsized_fn_params)]` can be stabilized. The problem is that the design of the `"rust-call"` ABI is fundamentally not compatible with `unsized_fn_params`. `"rust-call"` functions need to collect their arguments into a tuple, but if the arguments are not `Sized`, said tuple is potentially not even a valid type—and if it is, it requires `alloca` to create. `@rustbot` label +A-abi +A-codegen +F-unboxed_closures +F-unsized_fn_params
…ywiser Nicer ICE for rust-lang#67981 Provides a slightly nicer ICE for rust-lang#67981, documenting the problem. A proper fix will be necessary before `#![feature(unsized_fn_params)]` can be stabilized. The problem is that the design of the `"rust-call"` ABI is fundamentally not compatible with `unsized_fn_params`. `"rust-call"` functions need to collect their arguments into a tuple, but if the arguments are not `Sized`, said tuple is potentially not even a valid type—and if it is, it requires `alloca` to create. ``@rustbot`` label +A-abi +A-codegen +F-unboxed_closures +F-unsized_fn_params
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#110426 (docs(style): add more let-else examples) - rust-lang#110804 (Remove repeated definite articles) - rust-lang#110814 (Sprinkle some `#[inline]` in `rustc_data_structures::tagged_ptr`) - rust-lang#110816 (Migrate `rustc_passes` to translatable diagnostics) - rust-lang#110864 (`IntoFuture::into_future` is no longer unstable) - rust-lang#110866 (Make `method-not-found-generic-arg-elision.rs` error message not path dependent) - rust-lang#110872 (Nicer ICE for rust-lang#67981) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
With #110872, this now has a slightly nicer ICE. The issue is that |
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.
…compiler-errors Always require closure parameters to be `Sized` 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. `@rustbot` label A-closures F-unsized_fn_params
#111864 added a relevant test, dropping |
The following ICE's in nightly:
Backtrace:
The text was updated successfully, but these errors were encountered: