-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
rust-lang/rust
#147202Labels
from-craterA regression found via a crater run, not part of our test suiteA regression found via a crater run, not part of our test suite
Description
fn foo<'a>() -> impl Send {
if false {
foo();
}
async {}
}
results in
error[E0283]: type annotations needed: cannot satisfy `{async block@src/main.rs:5:5: 5:10}: Send`
--> src/main.rs:3:9
|
3 | foo();
| ^^^^^
|
= note: cannot satisfy `{async block@src/main.rs:5:5: 5:10}: Send`
we first take stalled coroutine obligations, this encounters foo<'unconstrained> normalizes-to ?infer
and foo<'a> normalizes-to {coroutine}
. It only takes the second one.
We then apply the defining use to foo<'unconstrained> normalizes-to ?infer
which constrains ?infer
to {coroutine}
. We do not take stalled obligations again, meaning that this normalizes-to goal stays ambiguous :<
Metadata
Metadata
Assignees
Labels
from-craterA regression found via a crater run, not part of our test suiteA regression found via a crater run, not part of our test suite
Type
Projects
Status
done