mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 13:33:31 +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;
|
Context, sym::Context, context, Target::Struct, GenericRequirement::None;
|
||||||
FuturePoll, sym::poll, future_poll_fn, Target::Method(MethodKind::Trait { body: false }), 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;
|
Option, sym::Option, option_type, Target::Enum, GenericRequirement::None;
|
||||||
OptionSome, sym::Some, option_some_variant, Target::Variant, 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;
|
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;
|
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;
|
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;
|
PinNewUnchecked, sym::new_unchecked, new_unchecked_fn, Target::Method(MethodKind::Inherent), GenericRequirement::None;
|
||||||
|
|
||||||
|
|
|
@ -8465,7 +8465,7 @@ impl Iterator for S {
|
||||||
file_id: FileId(
|
file_id: FileId(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
full_range: 7800..8008,
|
full_range: 7800..8042,
|
||||||
focus_range: 7865..7871,
|
focus_range: 7865..7871,
|
||||||
name: "Future",
|
name: "Future",
|
||||||
kind: Trait,
|
kind: Trait,
|
||||||
|
@ -8479,8 +8479,8 @@ impl Iterator for S {
|
||||||
file_id: FileId(
|
file_id: FileId(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
full_range: 8638..9104,
|
full_range: 8672..9171,
|
||||||
focus_range: 8682..8690,
|
focus_range: 8749..8757,
|
||||||
name: "Iterator",
|
name: "Iterator",
|
||||||
kind: Trait,
|
kind: Trait,
|
||||||
container_name: "iterator",
|
container_name: "iterator",
|
||||||
|
|
|
@ -239,6 +239,7 @@ define_symbols! {
|
||||||
fundamental,
|
fundamental,
|
||||||
future_trait,
|
future_trait,
|
||||||
future,
|
future,
|
||||||
|
future_output,
|
||||||
Future,
|
Future,
|
||||||
ge,
|
ge,
|
||||||
get_context,
|
get_context,
|
||||||
|
@ -273,6 +274,7 @@ define_symbols! {
|
||||||
iter_mut,
|
iter_mut,
|
||||||
iter,
|
iter,
|
||||||
Iterator,
|
Iterator,
|
||||||
|
iterator,
|
||||||
keyword,
|
keyword,
|
||||||
lang,
|
lang,
|
||||||
le,
|
le,
|
||||||
|
|
|
@ -1195,6 +1195,7 @@ pub mod future {
|
||||||
#[doc(notable_trait)]
|
#[doc(notable_trait)]
|
||||||
#[lang = "future_trait"]
|
#[lang = "future_trait"]
|
||||||
pub trait Future {
|
pub trait Future {
|
||||||
|
#[lang = "future_output"]
|
||||||
type Output;
|
type Output;
|
||||||
#[lang = "poll"]
|
#[lang = "poll"]
|
||||||
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>;
|
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>;
|
||||||
|
@ -1292,6 +1293,7 @@ pub mod iter {
|
||||||
mod traits {
|
mod traits {
|
||||||
mod iterator {
|
mod iterator {
|
||||||
#[doc(notable_trait)]
|
#[doc(notable_trait)]
|
||||||
|
#[lang = "iterator"]
|
||||||
pub trait Iterator {
|
pub trait Iterator {
|
||||||
type Item;
|
type Item;
|
||||||
#[lang = "next"]
|
#[lang = "next"]
|
||||||
|
|
Loading…
Reference in a new issue