mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 21:13:37 +00:00
Provide Future::Output
and Iterator
lang items
This commit is contained in:
parent
3712bb7f6a
commit
34920dde8d
4 changed files with 9 additions and 3 deletions
|
@ -461,6 +461,7 @@ language_item_table! {
|
|||
|
||||
Context, sym::Context, context, Target::Struct, GenericRequirement::None;
|
||||
FuturePoll, sym::poll, future_poll_fn, Target::Method(MethodKind::Trait { body: false }), GenericRequirement::None;
|
||||
FutureOutput, sym::future_output, future_output, Target::TypeAlias, GenericRequirement::None;
|
||||
|
||||
Option, sym::Option, option_type, Target::Enum, GenericRequirement::None;
|
||||
OptionSome, sym::Some, option_some_variant, Target::Variant, GenericRequirement::None;
|
||||
|
@ -475,6 +476,7 @@ language_item_table! {
|
|||
IntoFutureIntoFuture, sym::into_future, into_future_fn, Target::Method(MethodKind::Trait { body: false }), GenericRequirement::None;
|
||||
IntoIterIntoIter, sym::into_iter, into_iter_fn, Target::Method(MethodKind::Trait { body: false }), GenericRequirement::None;
|
||||
IteratorNext, sym::next, next_fn, Target::Method(MethodKind::Trait { body: false}), GenericRequirement::None;
|
||||
Iterator, sym::iterator, iterator, Target::Trait, GenericRequirement::None;
|
||||
|
||||
PinNewUnchecked, sym::new_unchecked, new_unchecked_fn, Target::Method(MethodKind::Inherent), GenericRequirement::None;
|
||||
|
||||
|
|
|
@ -8465,7 +8465,7 @@ impl Iterator for S {
|
|||
file_id: FileId(
|
||||
1,
|
||||
),
|
||||
full_range: 7800..8008,
|
||||
full_range: 7800..8042,
|
||||
focus_range: 7865..7871,
|
||||
name: "Future",
|
||||
kind: Trait,
|
||||
|
@ -8479,8 +8479,8 @@ impl Iterator for S {
|
|||
file_id: FileId(
|
||||
1,
|
||||
),
|
||||
full_range: 8638..9104,
|
||||
focus_range: 8682..8690,
|
||||
full_range: 8672..9171,
|
||||
focus_range: 8749..8757,
|
||||
name: "Iterator",
|
||||
kind: Trait,
|
||||
container_name: "iterator",
|
||||
|
|
|
@ -239,6 +239,7 @@ define_symbols! {
|
|||
fundamental,
|
||||
future_trait,
|
||||
future,
|
||||
future_output,
|
||||
Future,
|
||||
ge,
|
||||
get_context,
|
||||
|
@ -273,6 +274,7 @@ define_symbols! {
|
|||
iter_mut,
|
||||
iter,
|
||||
Iterator,
|
||||
iterator,
|
||||
keyword,
|
||||
lang,
|
||||
le,
|
||||
|
|
|
@ -1195,6 +1195,7 @@ pub mod future {
|
|||
#[doc(notable_trait)]
|
||||
#[lang = "future_trait"]
|
||||
pub trait Future {
|
||||
#[lang = "future_output"]
|
||||
type Output;
|
||||
#[lang = "poll"]
|
||||
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>;
|
||||
|
@ -1292,6 +1293,7 @@ pub mod iter {
|
|||
mod traits {
|
||||
mod iterator {
|
||||
#[doc(notable_trait)]
|
||||
#[lang = "iterator"]
|
||||
pub trait Iterator {
|
||||
type Item;
|
||||
#[lang = "next"]
|
||||
|
|
Loading…
Reference in a new issue