-
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
internal compiler error when copying borrow of leaked Box into async move closure for FutureExt::then #123334
Comments
BTW: I also consider it a bug that I couldn't simply move let bg_task = background.get_color_description_task(ctx);
let fg_task = foreground.get_color_description_task(ctx);
let bg_and_fg = join_all([bg_task, fg_task]);
bg_and_fg.then(async move |mut bg_and_fg: Vec<SimpleArcow<ColorDescription>>| {
let fg = bg_and_fg.pop().unwrap();
let bg = bg_and_fg.pop().unwrap();
let max_colors = Arc::new(pixels + 1);
Arcow::from_owned(fg
.stack_on(&bg, *max_colors))
}).boxed() |
Confirmed that this also happens on the latest nightly version:
|
@Pr0methean this looks more like a bug in the compiler rather than clippy, does this happen with |
Yes, it does happen with |
On (nightly rustc 2024-04-08): backtrace
|
searched nightlies: from nightly-2024-01-01 to nightly-2024-02-27 bisected with cargo-bisect-rustc v0.6.8Host triple: aarch64-unknown-linux-gnu cargo bisect-rustc --start=2024-01-01 --end=2024-02-27 --regress=ice --script ./test.sh |
@rustbot labels +AsyncAwait-Triaged We discussed this in async triage. @Pr0methean: Thanks for linking to a repo here. Might you be able to help narrow this down to a smaller reproducible test case? That would definitely help us to make progress here. |
tried narrowing it down and got here. is this the same bug? #![feature(async_closure)]
fn f(x: ()) {
async move |_| { x };
} looks like this is mentioned in #123901 |
The error message is different ("broken MIR in DefId" instead of "leftover child captures?"), but it may be related. |
Yeah, it's the same problem. |
This will likely be fixed when I rebase #124902. |
pretty sure this is fixed |
Summary
Reproducer
I tried to run
cd main && cargo clippy
against Pr0methean/OcHd-RustBuild@5a9dee8. The code near where the error arose is:The error I get is
Version
Reproducer
I tried this code:
<code>
I expected to see this happen:
Instead, this happened:
Version
No response
Additional Labels
No response
The text was updated successfully, but these errors were encountered: