From 3f2cb6eba1ce2dfdc4db3743f29363396942ce28 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Thu, 10 Mar 2022 20:29:35 +0100 Subject: [PATCH] Rename `IntoFuture::Future` to `IntoFuture::IntoFuture` --- library/core/src/future/into_future.rs | 8 ++++---- src/test/ui/async-await/await-into-future.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/core/src/future/into_future.rs b/library/core/src/future/into_future.rs index 0912f8675fa84..8014dacdd98da 100644 --- a/library/core/src/future/into_future.rs +++ b/library/core/src/future/into_future.rs @@ -9,20 +9,20 @@ pub trait IntoFuture { /// Which kind of future are we turning this into? #[unstable(feature = "into_future", issue = "67644")] - type Future: Future; + type IntoFuture: Future; /// Creates a future from a value. #[unstable(feature = "into_future", issue = "67644")] #[lang = "into_future"] - fn into_future(self) -> Self::Future; + fn into_future(self) -> Self::IntoFuture; } #[unstable(feature = "into_future", issue = "67644")] impl IntoFuture for F { type Output = F::Output; - type Future = F; + type IntoFuture = F; - fn into_future(self) -> Self::Future { + fn into_future(self) -> Self::IntoFuture { self } } diff --git a/src/test/ui/async-await/await-into-future.rs b/src/test/ui/async-await/await-into-future.rs index b74b168444085..6e1b155e181ee 100644 --- a/src/test/ui/async-await/await-into-future.rs +++ b/src/test/ui/async-await/await-into-future.rs @@ -10,9 +10,9 @@ struct AwaitMe; impl IntoFuture for AwaitMe { type Output = i32; - type Future = Pin>>; + type IntoFuture = Pin>>; - fn into_future(self) -> Self::Future { + fn into_future(self) -> Self::IntoFuture { Box::pin(me()) } }