about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/instance.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-02-28 20:25:25 +0000
committerMichael Goulet <michael@errs.io>2024-03-19 16:59:24 -0400
commitf1fef64e19909487ff2640bce58ce49fcfb4b85d (patch)
tree7281d36cff4865852e3d9c6193ba6689204ab033 /compiler/rustc_ty_utils/src/instance.rs
parent05116c5c30dea6895fb65fe31b6f2dd0f1198b51 (diff)
downloadrust-f1fef64e19909487ff2640bce58ce49fcfb4b85d.tar.gz
rust-f1fef64e19909487ff2640bce58ce49fcfb4b85d.zip
Fix ABI for FnMut/Fn impls for async closures
Diffstat (limited to 'compiler/rustc_ty_utils/src/instance.rs')
-rw-r--r--compiler/rustc_ty_utils/src/instance.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_ty_utils/src/instance.rs b/compiler/rustc_ty_utils/src/instance.rs
index c2ea89f4c29..a8f9afb87dd 100644
--- a/compiler/rustc_ty_utils/src/instance.rs
+++ b/compiler/rustc_ty_utils/src/instance.rs
@@ -282,6 +282,7 @@ fn resolve_associated_item<'tcx>(
                             Some(Instance {
                                 def: ty::InstanceDef::ConstructCoroutineInClosureShim {
                                     coroutine_closure_def_id,
+                                    receiver_by_ref: target_kind != ty::ClosureKind::FnOnce,
                                 },
                                 args,
                             })
@@ -304,6 +305,7 @@ fn resolve_associated_item<'tcx>(
                             Some(Instance {
                                 def: ty::InstanceDef::ConstructCoroutineInClosureShim {
                                     coroutine_closure_def_id,
+                                    receiver_by_ref: false,
                                 },
                                 args,
                             })