about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-12-20 17:46:34 +0000
committerMichael Goulet <michael@errs.io>2023-12-25 20:31:28 +0000
commitfde86e586dfc9826d0db81d1230aba77eb043bc6 (patch)
tree64cbb2950db0619ed63a678a52d681ca09993b0c
parent0e6f7c6c7c8f64327150c973606c1a87d587a3cc (diff)
downloadrust-fde86e586dfc9826d0db81d1230aba77eb043bc6.tar.gz
rust-fde86e586dfc9826d0db81d1230aba77eb043bc6.zip
We do not need impl_trait_in_assoc_ty
-rw-r--r--library/core/src/lib.rs1
-rw-r--r--library/core/src/ops/async_function.rs12
2 files changed, 6 insertions, 7 deletions
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index 1cd0240b87c..07720f23598 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -227,7 +227,6 @@
 #![feature(fundamental)]
 #![feature(generic_arg_infer)]
 #![feature(if_let_guard)]
-#![feature(impl_trait_in_assoc_type)]
 #![feature(inline_const)]
 #![feature(intra_doc_pointers)]
 #![feature(intrinsics)]
diff --git a/library/core/src/ops/async_function.rs b/library/core/src/ops/async_function.rs
index 0e05badd06d..5e5267ed97a 100644
--- a/library/core/src/ops/async_function.rs
+++ b/library/core/src/ops/async_function.rs
@@ -70,10 +70,10 @@ mod impls {
     where
         <F as FnOnce<A>>::Output: Future,
     {
-        type CallFuture<'a> = impl Future<Output = Self::Output> where Self: 'a;
+        type CallFuture<'a> = <F as FnOnce<A>>::Output where Self: 'a;
 
         extern "rust-call" fn async_call(&self, args: A) -> Self::CallFuture<'_> {
-            async { self.call(args).await }
+            self.call(args)
         }
     }
 
@@ -82,10 +82,10 @@ mod impls {
     where
         <F as FnOnce<A>>::Output: Future,
     {
-        type CallMutFuture<'a> = impl Future<Output = Self::Output> where Self: 'a;
+        type CallMutFuture<'a> = <F as FnOnce<A>>::Output where Self: 'a;
 
         extern "rust-call" fn async_call_mut(&mut self, args: A) -> Self::CallMutFuture<'_> {
-            async { self.call_mut(args).await }
+            self.call_mut(args)
         }
     }
 
@@ -94,12 +94,12 @@ mod impls {
     where
         <F as FnOnce<A>>::Output: Future,
     {
-        type CallOnceFuture = impl Future<Output = Self::Output>;
+        type CallOnceFuture = <F as FnOnce<A>>::Output;
 
         type Output = <<F as FnOnce<A>>::Output as Future>::Output;
 
         extern "rust-call" fn async_call_once(self, args: A) -> Self::CallOnceFuture {
-            async { self.call_once(args).await }
+            self.call_once(args)
         }
     }
 }