Skip to content

Commit ad8ebb5

Browse files
authored
Rollup merge of #105915 - andrewpollack:revert-105250-async-rm-resumety, r=tmandry
Revert "Replace usage of `ResumeTy` in async lowering with `Context`" Reverts rust-lang/rust#105250 Fixes: #105501 Following instructions from [forge](https://forge.rust-lang.org/compiler/reviews.html#reverts). This change introduced a breaking change that is not actionable nor relevant, and is blocking updates to our toolchain. Along with other comments on the CL marking issues that are fixed by reverts, reverting is best until these issues can be resolved cc. `@Swatinem`
2 parents aea7b6a + 597f0a2 commit ad8ebb5

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

core/src/future/mod.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub use poll_fn::{poll_fn, PollFn};
4444
/// non-Send/Sync as well, and we don't want that.
4545
///
4646
/// It also simplifies the HIR lowering of `.await`.
47-
// FIXME(swatinem): This type can be removed when bumping the bootstrap compiler
47+
#[cfg_attr(not(bootstrap), lang = "ResumeTy")]
4848
#[doc(hidden)]
4949
#[unstable(feature = "gen_future", issue = "50547")]
5050
#[derive(Debug, Copy, Clone)]
@@ -61,7 +61,6 @@ unsafe impl Sync for ResumeTy {}
6161
/// This function returns a `GenFuture` underneath, but hides it in `impl Trait` to give
6262
/// better error messages (`impl Future` rather than `GenFuture<[closure.....]>`).
6363
// This is `const` to avoid extra errors after we recover from `const async fn`
64-
// FIXME(swatinem): This fn can be removed when bumping the bootstrap compiler
6564
#[cfg_attr(bootstrap, lang = "from_generator")]
6665
#[doc(hidden)]
6766
#[unstable(feature = "gen_future", issue = "50547")]
@@ -103,8 +102,7 @@ where
103102
GenFuture(gen)
104103
}
105104

106-
// FIXME(swatinem): This fn can be removed when bumping the bootstrap compiler
107-
#[cfg_attr(bootstrap, lang = "get_context")]
105+
#[lang = "get_context"]
108106
#[doc(hidden)]
109107
#[unstable(feature = "gen_future", issue = "50547")]
110108
#[must_use]
@@ -115,10 +113,6 @@ pub unsafe fn get_context<'a, 'b>(cx: ResumeTy) -> &'a mut Context<'b> {
115113
unsafe { &mut *cx.0.as_ptr().cast() }
116114
}
117115

118-
// FIXME(swatinem): This fn is currently needed to work around shortcomings
119-
// in type and lifetime inference.
120-
// See the comment at the bottom of `LoweringContext::make_async_expr` and
121-
// <https://github.com/rust-lang/rust/issues/104826>.
122116
#[cfg_attr(not(bootstrap), lang = "identity_future")]
123117
#[doc(hidden)]
124118
#[unstable(feature = "gen_future", issue = "50547")]

core/src/task/wake.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ impl RawWakerVTable {
174174
/// Currently, `Context` only serves to provide access to a [`&Waker`](Waker)
175175
/// which can be used to wake the current task.
176176
#[stable(feature = "futures_api", since = "1.36.0")]
177-
#[cfg_attr(not(bootstrap), lang = "Context")]
178177
pub struct Context<'a> {
179178
waker: &'a Waker,
180179
// Ensure we future-proof against variance changes by forcing

0 commit comments

Comments
 (0)