about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis
diff options
context:
space:
mode:
authorDaria Sukhonina <dariasukhonina@gmail.com>2024-05-02 17:59:02 +0300
committerDaria Sukhonina <dariasukhonina@gmail.com>2024-05-29 12:50:44 +0300
commita47173c4f77b5e7c960ffe178eba2bc00bb91e31 (patch)
tree989af6a6533239303e9e055a2b0219f2b050be62 /compiler/rustc_hir_analysis
parente0904cd6a96e76f89112ea83b45e4c507e3e31df (diff)
downloadrust-a47173c4f77b5e7c960ffe178eba2bc00bb91e31.tar.gz
rust-a47173c4f77b5e7c960ffe178eba2bc00bb91e31.zip
Start implementing needs_async_drop and related
Diffstat (limited to 'compiler/rustc_hir_analysis')
-rw-r--r--compiler/rustc_hir_analysis/src/check/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/mod.rs b/compiler/rustc_hir_analysis/src/check/mod.rs
index 0083da2a1e4..149e7737e30 100644
--- a/compiler/rustc_hir_analysis/src/check/mod.rs
+++ b/compiler/rustc_hir_analysis/src/check/mod.rs
@@ -112,6 +112,7 @@ pub fn provide(providers: &mut Providers) {
     wfcheck::provide(providers);
     *providers = Providers {
         adt_destructor,
+        adt_async_destructor,
         region_scope_tree,
         collect_return_position_impl_trait_in_trait_tys,
         compare_impl_const: compare_impl_item::compare_impl_const_raw,
@@ -124,6 +125,10 @@ fn adt_destructor(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<ty::Destructor>
     tcx.calculate_dtor(def_id.to_def_id(), dropck::check_drop_impl)
 }
 
+fn adt_async_destructor(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<ty::AsyncDestructor> {
+    tcx.calculate_async_dtor(def_id.to_def_id(), dropck::check_drop_impl)
+}
+
 /// Given a `DefId` for an opaque type in return position, find its parent item's return
 /// expressions.
 fn get_owner_return_paths(