44// - Captured vars from the source are not marked artificial
55//
66// ignore-tidy-linelength
7- // compile-flags: -C debuginfo=2 --edition=2018
7+ // compile-flags: -C debuginfo=2
88// only-msvc
99
1010#![ feature( generators, generator_trait) ]
@@ -18,19 +18,12 @@ fn generator_test() -> impl Generator<Yield = i32, Return = ()> {
1818 }
1919}
2020
21- async fn foo ( ) { }
22- async fn async_fn_test ( ) {
23- foo ( ) . await ;
24- let s = String :: from ( "foo" ) ;
25- foo ( ) . await ;
26- }
27-
2821// FIXME: No way to reliably check the filename.
2922
3023// CHECK-DAG: [[GEN_FN:!.*]] = !DINamespace(name: "generator_test"
31- // CHECK-DAG: [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_union_type, name: "generator-0", scope: [[GEN_FN]],
24+ // CHECK-DAG: [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_union_type, name: "generator-0", scope: [[GEN_FN]], {{.*}}flags: DIFlagArtificial
3225// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, scope: [[GEN]],
33- // For brevity, we just check the struct name and members of the last variant.
26+ // For brevity, we only check the struct name and members of the last variant.
3427// CHECK-SAME: file: [[FILE:![0-9]*]], line: 14,
3528// CHECK-SAME: flags: DIFlagArtificial
3629// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, scope: [[GEN]],
@@ -54,33 +47,6 @@ async fn async_fn_test() {
5447// CHECK-NOT: flags: DIFlagArtificial
5548// CHECK-SAME: )
5649
57- // CHECK-DAG: [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_union_type, name: "generator-0", scope: [[ASYNC_FN:![0-9]*]], {{.*}}flags: DIFlagArtificial
58- // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, scope: [[GEN]],
59- // For brevity, we just check the struct name and members of the last variant.
60- // CHECK-SAME: file: [[FILE]], line: 22,
61- // CHECK-SAME: flags: DIFlagArtificial
62- // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, scope: [[GEN]],
63- // CHECK-SAME: file: [[FILE]], line: 26,
64- // CHECK-SAME: flags: DIFlagArtificial
65- // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, scope: [[GEN]],
66- // CHECK-SAME: file: [[FILE]], line: 26,
67- // CHECK-SAME: flags: DIFlagArtificial
68- // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, scope: [[GEN]],
69- // CHECK-SAME: file: [[FILE]], line: 23,
70- // CHECK-SAME: flags: DIFlagArtificial
71- // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, scope: [[GEN]],
72- // CHECK-SAME: file: [[FILE]], line: 25,
73- // CHECK-SAME: baseType: [[VARIANT:![0-9]*]]
74- // CHECK-SAME: flags: DIFlagArtificial
75- // CHECK: [[S1:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "Suspend1", scope: [[ASYNC_FN]],
76- // CHECK-SAME: flags: DIFlagArtificial
77- // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "RUST$ENUM$DISR", scope: [[S1]],
78- // CHECK-SAME: flags: DIFlagArtificial
79- // CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "s", scope: [[S1]]
80- // CHECK-NOT: flags: DIFlagArtificial
81- // CHECK-SAME: )
82-
8350fn main ( ) {
8451 let _dummy = generator_test ( ) ;
85- let _dummy = async_fn_test ( ) ;
8652}
0 commit comments