diff options
| author | Arpad Borsos <swatinem@swatinem.de> | 2023-05-07 10:52:01 +0200 |
|---|---|---|
| committer | Arpad Borsos <swatinem@swatinem.de> | 2023-05-07 10:52:01 +0200 |
| commit | 48dfbeee27e748a598681d24bd8b69f5ea611f85 (patch) | |
| tree | 63b50c0deba92c53ff37850c785319ff8e4db1e1 | |
| parent | 70a779cb7d827c0007dde1751d272bfdb58dded5 (diff) | |
| download | rust-48dfbeee27e748a598681d24bd8b69f5ea611f85.tar.gz rust-48dfbeee27e748a598681d24bd8b69f5ea611f85.zip | |
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`.
| -rw-r--r-- | library/core/src/future/mod.rs | 7 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/crates/hir-def/src/lang_item.rs | 1 |
2 files changed, 0 insertions, 8 deletions
diff --git a/library/core/src/future/mod.rs b/library/core/src/future/mod.rs index 7a8d0cacdec..089493d3766 100644 --- a/library/core/src/future/mod.rs +++ b/library/core/src/future/mod.rs @@ -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 -} diff --git a/src/tools/rust-analyzer/crates/hir-def/src/lang_item.rs b/src/tools/rust-analyzer/crates/hir-def/src/lang_item.rs index 4096e0a3826..d338bb41205 100644 --- a/src/tools/rust-analyzer/crates/hir-def/src/lang_item.rs +++ b/src/tools/rust-analyzer/crates/hir-def/src/lang_item.rs @@ -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; |
