-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-HIRArea: The high-level intermediate representation (HIR)Area: The high-level intermediate representation (HIR)A-async-awaitArea: Async & AwaitArea: Async & AwaitA-prettyArea: Pretty printing (including `-Z unpretty`)Area: Pretty printing (including `-Z unpretty`)AsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
async fn foo(_: &u8) {}
expanded with rustc --edition 2018 -Z unpretty=hir
yields
async fn foo<'_>(__arg0: &'_ u8)
->
::std::future::from_generator(move ||
{
let __arg0 = __arg0;
let _ = __arg0;
})
which is not correct. We should drop the async
, give a return type and print some {}
around the function body.
cc @cramertj
Metadata
Metadata
Assignees
Labels
A-HIRArea: The high-level intermediate representation (HIR)Area: The high-level intermediate representation (HIR)A-async-awaitArea: Async & AwaitArea: Async & AwaitA-prettyArea: Pretty printing (including `-Z unpretty`)Area: Pretty printing (including `-Z unpretty`)AsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.