Skip to content

Commit 28b9696

Browse files
authored
Rollup merge of #111315 - Swatinem:rm-identitiy-future, r=Mark-Simulacrum
Remove `identity_future` from stdlib This function/lang_item was introduced in #104321 as a temporary workaround of future lowering. The usage and need for it went away in #104833. After a bootstrap update, the function itself can be removed from `std`.
2 parents c145d93 + 48dfbee commit 28b9696

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

library/core/src/future/mod.rs

-7
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,3 @@ pub unsafe fn get_context<'a, 'b>(cx: ResumeTy) -> &'a mut Context<'b> {
6666
// that fulfills all the requirements for a mutable reference.
6767
unsafe { &mut *cx.0.as_ptr().cast() }
6868
}
69-
70-
#[doc(hidden)]
71-
#[unstable(feature = "gen_future", issue = "50547")]
72-
#[inline]
73-
pub const fn identity_future<O, Fut: Future<Output = O>>(f: Fut) -> Fut {
74-
f
75-
}

src/tools/rust-analyzer/crates/hir-def/src/lang_item.rs

-1
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ language_item_table! {
379379
// FIXME(swatinem): the following lang items are used for async lowering and
380380
// should become obsolete eventually.
381381
ResumeTy, ResumeTy, resume_ty, Target::Struct, GenericRequirement::None;
382-
IdentityFuture, identity_future, identity_future_fn, Target::Fn, GenericRequirement::None;
383382
GetContext, get_context, get_context_fn, Target::Fn, GenericRequirement::None;
384383

385384
Context, Context, context, Target::Struct, GenericRequirement::None;

0 commit comments

Comments
 (0)