]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/future/mod.rs
Revert "Implement allow-by-default multiple_supertrait_upcastable lint"
[rust.git] / library / core / src / future / mod.rs
index 2a8e12fd4cf60fcc2bbc8aa749c500a6229f009c..5bfe001de46e3775f456a9c42c026b0b4230e253 100644 (file)
@@ -44,7 +44,7 @@
 ///    non-Send/Sync as well, and we don't want that.
 ///
 /// It also simplifies the HIR lowering of `.await`.
-// FIXME(swatinem): This type can be removed when bumping the bootstrap compiler
+#[lang = "ResumeTy"]
 #[doc(hidden)]
 #[unstable(feature = "gen_future", issue = "50547")]
 #[derive(Debug, Copy, Clone)]
@@ -61,8 +61,6 @@ unsafe impl Sync for ResumeTy {}
 /// This function returns a `GenFuture` underneath, but hides it in `impl Trait` to give
 /// better error messages (`impl Future` rather than `GenFuture<[closure.....]>`).
 // This is `const` to avoid extra errors after we recover from `const async fn`
-// FIXME(swatinem): This fn can be removed when bumping the bootstrap compiler
-#[cfg_attr(bootstrap, lang = "from_generator")]
 #[doc(hidden)]
 #[unstable(feature = "gen_future", issue = "50547")]
 #[rustc_const_unstable(feature = "gen_future", issue = "50547")]
@@ -103,8 +101,7 @@ fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
     GenFuture(gen)
 }
 
-// FIXME(swatinem): This fn can be removed when bumping the bootstrap compiler
-#[cfg_attr(bootstrap, lang = "get_context")]
+#[lang = "get_context"]
 #[doc(hidden)]
 #[unstable(feature = "gen_future", issue = "50547")]
 #[must_use]
@@ -115,14 +112,10 @@ pub unsafe fn get_context<'a, 'b>(cx: ResumeTy) -> &'a mut Context<'b> {
     unsafe { &mut *cx.0.as_ptr().cast() }
 }
 
-// FIXME(swatinem): This fn is currently needed to work around shortcomings
-// in type and lifetime inference.
-// See the comment at the bottom of `LoweringContext::make_async_expr` and
-// <https://github.com/rust-lang/rust/issues/104826>.
-#[cfg_attr(not(bootstrap), lang = "identity_future")]
 #[doc(hidden)]
 #[unstable(feature = "gen_future", issue = "50547")]
 #[inline]
+#[lang = "identity_future"]
 pub const fn identity_future<O, Fut: Future<Output = O>>(f: Fut) -> Fut {
     f
 }