Skip to content

Commit bffb346

Browse files
committed
Make test more robust to opts.
1 parent 44ac8dc commit bffb346

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/codegen/async-fn-debug-awaitee-field.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
// ignore-tidy-linelength
66
// compile-flags: -C debuginfo=2 --edition=2018
77

8-
async fn foo() {}
8+
#![crate_type = "lib"]
99

10-
async fn async_fn_test() {
10+
pub async fn async_fn_test() {
1111
foo().await;
1212
}
1313

14+
pub async fn foo() {}
15+
1416
// NONMSVC: [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "{async_fn_env#0}", scope: [[GEN_SCOPE:![0-9]*]],
1517
// MSVC: [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<async_fn_debug_awaitee_field::async_fn_test::async_fn_env$0>",
1618
// NONMSVC: [[GEN_SCOPE:!.*]] = !DINamespace(name: "async_fn_test",
@@ -19,7 +21,3 @@ async fn async_fn_test() {
1921
// NONMSVC: [[AWAITEE_TYPE]] = !DICompositeType(tag: DW_TAG_structure_type, name: "{async_fn_env#0}", scope: [[AWAITEE_SCOPE:![0-9]*]],
2022
// MSVC: [[AWAITEE_TYPE]] = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<async_fn_debug_awaitee_field::foo::async_fn_env$0>",
2123
// NONMSVC: [[AWAITEE_SCOPE]] = !DINamespace(name: "foo",
22-
23-
fn main() {
24-
let _fn = async_fn_test();
25-
}

0 commit comments

Comments
 (0)