diff options
| author | bors <bors@rust-lang.org> | 2023-09-23 18:28:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-23 18:28:00 +0000 |
| commit | 13e6f24b9adda67852fb86538541adaa68aff6e8 (patch) | |
| tree | 7371be63f7ab92c90b4a1391a0d41ae215f5f2c8 /compiler/rustc_interface/src | |
| parent | 19c65022fc1ad9cc3d3dcf50a0bdf50e4ab572ab (diff) | |
| parent | bffb3467e1707a9d4fbff73fa6a7ed40cad5170b (diff) | |
| download | rust-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 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 14 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/tests.rs | 2 |
2 files changed, 6 insertions, 10 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index ce097922aef..0e8f93cef17 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -798,14 +798,12 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> { } }); - if tcx.sess.opts.unstable_opts.drop_tracking_mir { - tcx.hir().par_body_owners(|def_id| { - if let rustc_hir::def::DefKind::Generator = tcx.def_kind(def_id) { - tcx.ensure().mir_generator_witnesses(def_id); - tcx.ensure().check_generator_obligations(def_id); - } - }); - } + tcx.hir().par_body_owners(|def_id| { + if let rustc_hir::def::DefKind::Generator = tcx.def_kind(def_id) { + tcx.ensure().mir_generator_witnesses(def_id); + tcx.ensure().check_generator_obligations(def_id); + } + }); sess.time("layout_testing", || layout_test::test_layout(tcx)); sess.time("abi_testing", || abi_test::test_abi(tcx)); diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index 1746cc8b719..2510ce71460 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -684,7 +684,6 @@ fn test_unstable_options_tracking_hash() { untracked!(dep_tasks, true); untracked!(dont_buffer_diagnostics, true); untracked!(dump_dep_graph, true); - untracked!(dump_drop_tracking_cfg, Some("cfg.dot".to_string())); untracked!(dump_mir, Some(String::from("abc"))); untracked!(dump_mir_dataflow, true); untracked!(dump_mir_dir, String::from("abc")); @@ -773,7 +772,6 @@ fn test_unstable_options_tracking_hash() { tracked!(debug_info_for_profiling, true); tracked!(debug_macros, true); tracked!(dep_info_omit_d_target, true); - tracked!(drop_tracking, true); tracked!(dual_proc_macros, true); tracked!(dwarf_version, Some(5)); tracked!(emit_thin_lto, false); |
