This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 11// This test verifies the accuracy of emitted file and line debuginfo metadata for closures and
2- // generators .
2+ // coroutines .
33//
44// compile-flags: -C debuginfo=2 -Z debug-info-type-line-numbers=true
55#![ crate_type = "lib" ]
6- #![ feature( generators , stmt_expr_attributes) ]
6+ #![ feature( coroutines , stmt_expr_attributes) ]
77
88// ignore-tidy-linelength
99
10- // NONMSVC: ![[#FILE:]] = !DIFile({{.*}}filename:{{.*}}/issue-98678-closure-generator .rs{{".*}})
11- // MSVC: ![[#FILE:]] = !DIFile({{.*}}filename:{{.*}}\\issue-98678-closure-generator .rs{{".*}})
10+ // NONMSVC: ![[#FILE:]] = !DIFile({{.*}}filename:{{.*}}/issue-98678-closure-coroutine .rs{{".*}})
11+ // MSVC: ![[#FILE:]] = !DIFile({{.*}}filename:{{.*}}\\issue-98678-closure-coroutine .rs{{".*}})
1212
1313pub fn foo ( ) {
1414 // NONMSVC: !DICompositeType({{.*"}}{closure_env#0}{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 2]],
1515 // MSVC-DAG: !DICompositeType({{.*"}}closure_env$0{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 1]],
1616 let closure = |x| x;
1717 closure ( 0 ) ;
1818
19- // NONMSVC: !DICompositeType({{.*"[{]}}generator_env #1{{[}]".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 2]],
20- // MSVC-DAG: !DICompositeType({{.*".*foo::}}generator_env $1>{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 1]],
21- let generator = #[ coroutine]
19+ // NONMSVC: !DICompositeType({{.*"[{]}}coroutine_env #1{{[}]".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 2]],
20+ // MSVC-DAG: !DICompositeType({{.*".*foo::}}coroutine_env $1>{{".*}}file: ![[#FILE]]{{.*}}line: [[# @LINE + 1]],
21+ let coroutine = #[ coroutine]
2222 || yield 1 ;
2323}
You can’t perform that action at this time.
0 commit comments