Skip to content

Commit

Permalink
Remove identity_future from stdlib
Browse files Browse the repository at this point in the history
This function/lang_item was introduced in rust-lang#104321 as a temporary workaround of future lowering.
The usage and need for it went away in rust-lang#104833.
After a bootstrap update, the function itself can be removed from `std`.
  • Loading branch information
Swatinem committed May 7, 2023
1 parent 70a779c commit 48dfbee
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
7 changes: 0 additions & 7 deletions library/core/src/future/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,3 @@ pub unsafe fn get_context<'a, 'b>(cx: ResumeTy) -> &'a mut Context<'b> {
// that fulfills all the requirements for a mutable reference.
unsafe { &mut *cx.0.as_ptr().cast() }
}

#[doc(hidden)]
#[unstable(feature = "gen_future", issue = "50547")]
#[inline]
pub const fn identity_future<O, Fut: Future<Output = O>>(f: Fut) -> Fut {
f
}
1 change: 0 additions & 1 deletion src/tools/rust-analyzer/crates/hir-def/src/lang_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ language_item_table! {
// FIXME(swatinem): the following lang items are used for async lowering and
// should become obsolete eventually.
ResumeTy, ResumeTy, resume_ty, Target::Struct, GenericRequirement::None;
IdentityFuture, identity_future, identity_future_fn, Target::Fn, GenericRequirement::None;
GetContext, get_context, get_context_fn, Target::Fn, GenericRequirement::None;

Context, Context, context, Target::Struct, GenericRequirement::None;
Expand Down

0 comments on commit 48dfbee

Please sign in to comment.