-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Open
Labels
A-closuresArea: Closures (`|…| { … }`)Area: Closures (`|…| { … }`)A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesT-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
The following code:
pub async fn fn_with_nested_block() -> Backtrace {
None.unwrap_or_else(|| async { Backtrace::force_capture() })
.await
}
Generates the following demangled symbol with legacy demangling:
async_codegen::fn_with_nested_block::{{closure}}::{{closure}}::{{closure}}
(v0 mangling is similar, but with {closure#0}
instead)
Whereas Windows mangling gives this fn name:
async_codegen::fn_with_nested_block::async_fn$0::closure$0::async_block$0
This makes it clear what is an async fn, closure or async block. v0 symbol mangling should make a similar distinction.
#104333 is a first attempt to thread the necessary information through to the place that does the symbol mangling, but actually extending the v0 symbol mangling format / spec is necessary as well to fully solve this.
kornelski
Metadata
Metadata
Assignees
Labels
A-closuresArea: Closures (`|…| { … }`)Area: Closures (`|…| { … }`)A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesT-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.