]> git.lizzy.rs Git - rust.git/commit - compiler/rustc_codegen_cranelift/src/compiler_builtins.rs
Rollup merge of #95011 - michaelwoerister:awaitee_field, r=tmandry
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>
Wed, 30 Mar 2022 22:26:30 +0000 (00:26 +0200)
committerGitHub <noreply@github.com>
Wed, 30 Mar 2022 22:26:30 +0000 (00:26 +0200)
commit1c3657b20d9dc52574bcd19876ed56e1538bd605
tree0f54e622c3299a6aafc233e29b73fc188983de9b
parente08ab08a2e8c470d62aa7d41b1c1dc42696f9da8
parent78e27e2c7a85021a0b72253c17d0d99a383e8385
Rollup merge of #95011 - michaelwoerister:awaitee_field, r=tmandry

async: Give predictable name to binding generated from .await expressions.

This name makes it to debuginfo and allows debuggers to identify such bindings and their captured versions in suspended async fns.

This will be useful for async stack traces, as discussed in https://internals.rust-lang.org/t/async-debugging-logical-stack-traces-setting-goals-collecting-examples/15547.

I don't know if this needs some discussion by ````@rust-lang/compiler,```` e.g. about the name of the binding (`__awaitee`) or about the fact that this PR introduces a (soft) guarantee about a compiler generated name. Although, regarding the later, I think the same reasoning applies here as it does for debuginfo in general.

r? ````@tmandry````
compiler/rustc_span/src/symbol.rs