about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-23 18:28:00 +0000
committerbors <bors@rust-lang.org>2023-09-23 18:28:00 +0000
commit13e6f24b9adda67852fb86538541adaa68aff6e8 (patch)
tree7371be63f7ab92c90b4a1391a0d41ae215f5f2c8 /tests/codegen
parent19c65022fc1ad9cc3d3dcf50a0bdf50e4ab572ab (diff)
parentbffb3467e1707a9d4fbff73fa6a7ed40cad5170b (diff)
downloadrust-13e6f24b9adda67852fb86538541adaa68aff6e8.tar.gz
rust-13e6f24b9adda67852fb86538541adaa68aff6e8.zip
Auto merge of #107421 - cjgillot:drop-tracking-mir, r=oli-obk
Enable -Zdrop-tracking-mir by default

This PR enables the `drop-tracking-mir` flag by default. This flag was initially implemented in https://github.com/rust-lang/rust/pull/101692.

This flag computes auto-traits on generators based on their analysis MIR, instead of trying to compute on the HIR body. This removes the need for HIR-based drop-tracking, as we can now reuse the same code to compute generator witness types and to compute generator interior fields.
Diffstat (limited to 'tests/codegen')
-rw-r--r--tests/codegen/async-fn-debug-awaitee-field.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/codegen/async-fn-debug-awaitee-field.rs b/tests/codegen/async-fn-debug-awaitee-field.rs
index bc268615814..690505fd72b 100644
--- a/tests/codegen/async-fn-debug-awaitee-field.rs
+++ b/tests/codegen/async-fn-debug-awaitee-field.rs
@@ -5,12 +5,14 @@
 // ignore-tidy-linelength
 // compile-flags: -C debuginfo=2 --edition=2018
 
-async fn foo() {}
+#![crate_type = "lib"]
 
-async fn async_fn_test() {
+pub async fn async_fn_test() {
     foo().await;
 }
 
+pub async fn foo() {}
+
 // NONMSVC: [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "{async_fn_env#0}", scope: [[GEN_SCOPE:![0-9]*]],
 // MSVC: [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<async_fn_debug_awaitee_field::async_fn_test::async_fn_env$0>",
 // NONMSVC: [[GEN_SCOPE:!.*]] = !DINamespace(name: "async_fn_test",
@@ -19,7 +21,3 @@ async fn async_fn_test() {
 // NONMSVC: [[AWAITEE_TYPE]] = !DICompositeType(tag: DW_TAG_structure_type, name: "{async_fn_env#0}", scope: [[AWAITEE_SCOPE:![0-9]*]],
 // MSVC: [[AWAITEE_TYPE]] = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<async_fn_debug_awaitee_field::foo::async_fn_env$0>",
 // NONMSVC: [[AWAITEE_SCOPE]] = !DINamespace(name: "foo",
-
-fn main() {
-    let _fn = async_fn_test();
-}