-
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 unexpected unsized tail: std::alloc::Global #114325
Comments
Minimzed to: #![feature(impl_trait_in_assoc_type)]
use std::future::Future;
fn main() {
RuntimeRef::spawn_local(actor_fn(http_actor));
}
async fn http_actor() {
async fn respond(body: impl Body) {
body.write_message().await;
}
respond(&()).await;
}
trait Body {
type WriteFuture: Future;
fn write_message(self) -> Self::WriteFuture;
}
impl Body for &'static () {
type WriteFuture = impl Future<Output = ()>;
fn write_message(self) -> Self::WriteFuture {
async {}
}
}
trait NewActor {
type RuntimeAccess;
}
fn actor_fn<T, A>(_d: T) -> (T, A) {
loop {}
}
impl<F: FnMut() -> A, A> NewActor for (F, A) {
type RuntimeAccess = RuntimeRef;
}
struct RuntimeRef(Vec<()>);
impl RuntimeRef {
fn spawn_local<NA: NewActor<RuntimeAccess = RuntimeRef>>(_f: NA) {
struct ActorFuture<NA: NewActor>(NA::RuntimeAccess);
(ActorFuture::<NA>(RuntimeRef(vec![])), _f);
}
} This now errors with "unexpected unsized tail: usize", but i think that should be alright (?). If someone really needs the original error, I might have it lying around somewhere. |
Triage: The above minimal code now compiles successfully on 1.77.0-nightly (2023-12-24 bf8716f), so this issue may have been fixed or may need a new MCVE. |
Can confirm that this has been resolved. Do we want to keep this open to add a regression test? Otherwise I'm fine with closing. |
If the issue is fixed in @rustbot label -E-needs-mcve +E-needs-test |
Add non-regression test for ATPIT ICE rust-lang#114325 ATPIT issue rust-lang#114325 had been unknowingly fixed by rust-lang#107421, so this PR adds its [MCVE](rust-lang#114325 (comment)) as a non-regression test. Closes rust-lang#114325.
Add non-regression test for ATPIT ICE rust-lang#114325 ATPIT issue rust-lang#114325 had been unknowingly fixed by rust-lang#107421, so this PR adds its [MCVE](rust-lang#114325 (comment)) as a non-regression test. Closes rust-lang#114325.
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#119322 (Couple of random coroutine pass simplifications) - rust-lang#119374 (Italicise "bytes" in the docs of some `Vec` methods) - rust-lang#119388 (rustc_lint: Prevent triplication of various lints) - rust-lang#119406 (Add non-regression test for ATPIT ICE rust-lang#114325) - rust-lang#119410 (Rename test to be more descriptive) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#119406 - lqd:issue-114325, r=compiler-errors Add non-regression test for ATPIT ICE rust-lang#114325 ATPIT issue rust-lang#114325 had been unknowingly fixed by rust-lang#107421, so this PR adds its [MCVE](rust-lang#114325 (comment)) as a non-regression test. Closes rust-lang#114325.
Sorry in advance, this is going to be a pretty poor bug report as I don't have much time to look into this at the moment, but I did want to create an issue for it.
Code
I can't share the code at the moment, nor do I have time to create a minimal repo. I can say a number of nightly features are involved:I found that I can reproduce it in public code as well: https://github.com/Thomasdezeeuw/heph/tree/82faf4987d0ac1b07b7e81c481d0047b1f3dee5d/http. Running
cargo test --doc
fails, specifically this example: https://github.com/Thomasdezeeuw/heph/blob/82faf4987d0ac1b07b7e81c481d0047b1f3dee5d/http/src/server.rs#L28-L143.Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: