about summary refs log tree commit diff
path: root/src/test/codegen/async-fn-debug-msvc.rs
diff options
context:
space:
mode:
authorEric Holk <ericholk@microsoft.com>2022-01-13 15:31:36 -0800
committerEric Holk <ericholk@microsoft.com>2022-01-13 15:38:03 -0800
commit05e1f0d7691860e44e87595e8a6a572f7c14d605 (patch)
treebf9e562383f3e24ca72d7b89be1c794050df5283 /src/test/codegen/async-fn-debug-msvc.rs
parent22e491ac7ed454d34669151a8b6464cb643c9b41 (diff)
downloadrust-05e1f0d7691860e44e87595e8a6a572f7c14d605.tar.gz
rust-05e1f0d7691860e44e87595e8a6a572f7c14d605.zip
Generate more precise generator names
Currently all generators are named with a `generator$N` suffix,
regardless of where they come from. This means an `async fn` shows up as
a generator in stack traces, which can be surprising to async
programmers since they should not need to know that async functions are
implementated using generators.

This change generators a different name depending on the generator kind,
allowing us to tell whether the generator is the result of an async
block, an async closure, an async fn, or a plain generator.
Diffstat (limited to 'src/test/codegen/async-fn-debug-msvc.rs')
-rw-r--r--src/test/codegen/async-fn-debug-msvc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/codegen/async-fn-debug-msvc.rs b/src/test/codegen/async-fn-debug-msvc.rs
index 0c16b9ad3ab..bb0db9d3d85 100644
--- a/src/test/codegen/async-fn-debug-msvc.rs
+++ b/src/test/codegen/async-fn-debug-msvc.rs
@@ -17,7 +17,7 @@ async fn async_fn_test() {
 // FIXME: No way to reliably check the filename.
 
 // CHECK-DAG:  [[ASYNC_FN:!.*]] = !DINamespace(name: "async_fn_test"
-// CHECK-DAG:  [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_union_type, name: "generator$0"
+// CHECK-DAG:  [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_union_type, name: "async_fn$0"
 // CHECK:      {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "variant0", scope: [[GEN]],
 // For brevity, we only check the struct name and members of the last variant.
 // CHECK-SAME: file: [[FILE:![0-9]*]], line: 11,