by_move_body.rs:275:21: There should be at least a single deref for an upvar local initialization, found [] #138501
Labels
A-async-closures
`async || {}`
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
This compiler error appeared when I tried to wrap my function in an async block so I could use inner returns without returning from the parent fn; I want to call
.wrap_err
fromeyre
crate on whatever is returning so I can attach some information.I had previously attempted to use the unstable
try_blocks
feature, but I think myreturn Err
andbail!
usage in the body was returning from the fn instead of the try block.removing the wrapping async closure fixes the rustc-ice compiler error.
AAFC-Cloud/Cloud-Terrastodon@fc55eb8
here is the permalink to the relevant file at the commit where the compiler error manifests
https://github.com/AAFC-Cloud/Cloud-Terrastodon/blob/73709d3861d008195bb14824e1fc1bb0f03c1940/rust/crates/command/src/command.rs#L553
rustc-ice-2025-03-14T14_54_32-34820.txt
Meta
rustc --version --verbose
:Error output
Backtrace
I tried getting a smaller reproduction but was unsuccessful. The following code builds and runs without errors.
This compiles and runs properly
The text was updated successfully, but these errors were encountered: