Remove identity_future
indirection
This was previously needed because the indirection used to hide some unexplained lifetime errors, which it turned out were related to the `min_choice` algorithm. Removing the indirection also solves a couple of cycle errors, large moves and makes async blocks support the `#[track_caller]` annotation.
This commit is contained in:
parent
64165aac68
commit
9f03cfc207
32 changed files with 149 additions and 361 deletions
|
@ -67,14 +67,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>.
|
||||
#[doc(hidden)]
|
||||
#[unstable(feature = "gen_future", issue = "50547")]
|
||||
#[inline]
|
||||
#[lang = "identity_future"]
|
||||
#[cfg_attr(bootstrap, lang = "identity_future")]
|
||||
pub const fn identity_future<O, Fut: Future<Output = O>>(f: Fut) -> Fut {
|
||||
f
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue