about summary refs log tree commit diff
path: root/library/alloc
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-02-13 15:29:50 +0000
committerMichael Goulet <michael@errs.io>2024-03-19 16:59:23 -0400
commit05116c5c30dea6895fb65fe31b6f2dd0f1198b51 (patch)
tree2b749122abce71572f775b3aba670e61ff3c74c2 /library/alloc
parente760daa6a729b3d52a38804e9766f7d89dc27357 (diff)
downloadrust-05116c5c30dea6895fb65fe31b6f2dd0f1198b51.tar.gz
rust-05116c5c30dea6895fb65fe31b6f2dd0f1198b51.zip
Only split by-ref/by-move futures for async closures
Diffstat (limited to 'library/alloc')
-rw-r--r--library/alloc/src/boxed.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs
index f47fe560b07..cfaf533088a 100644
--- a/library/alloc/src/boxed.rs
+++ b/library/alloc/src/boxed.rs
@@ -2042,18 +2042,16 @@ impl<Args: Tuple, F: AsyncFnOnce<Args> + ?Sized, A: Allocator> AsyncFnOnce<Args>
 
 #[unstable(feature = "async_fn_traits", issue = "none")]
 impl<Args: Tuple, F: AsyncFnMut<Args> + ?Sized, A: Allocator> AsyncFnMut<Args> for Box<F, A> {
-    type CallMutFuture<'a> = F::CallMutFuture<'a> where Self: 'a;
+    type CallRefFuture<'a> = F::CallRefFuture<'a> where Self: 'a;
 
-    extern "rust-call" fn async_call_mut(&mut self, args: Args) -> Self::CallMutFuture<'_> {
+    extern "rust-call" fn async_call_mut(&mut self, args: Args) -> Self::CallRefFuture<'_> {
         F::async_call_mut(self, args)
     }
 }
 
 #[unstable(feature = "async_fn_traits", issue = "none")]
 impl<Args: Tuple, F: AsyncFn<Args> + ?Sized, A: Allocator> AsyncFn<Args> for Box<F, A> {
-    type CallFuture<'a> = F::CallFuture<'a> where Self: 'a;
-
-    extern "rust-call" fn async_call(&self, args: Args) -> Self::CallFuture<'_> {
+    extern "rust-call" fn async_call(&self, args: Args) -> Self::CallRefFuture<'_> {
         F::async_call(self, args)
     }
 }