Skip to content

Commit 597f0a2

Browse files
Revert "Replace usage of ResumeTy in async lowering with Context"
1 parent 7844df0 commit 597f0a2

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)