mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
⬆️ rust-analyzer
This commit is contained in:
parent
134701885d
commit
31519bb394
83 changed files with 2092 additions and 626 deletions
|
@ -471,6 +471,21 @@ pub mod future {
|
|||
#[lang = "poll"]
|
||||
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>;
|
||||
}
|
||||
|
||||
pub trait IntoFuture {
|
||||
type Output;
|
||||
type IntoFuture: Future<Output = Self::Output>;
|
||||
#[lang = "into_future"]
|
||||
fn into_future(self) -> Self::IntoFuture;
|
||||
}
|
||||
|
||||
impl<F: Future> IntoFuture for F {
|
||||
type Output = F::Output;
|
||||
type IntoFuture = F;
|
||||
fn into_future(self) -> F {
|
||||
self
|
||||
}
|
||||
}
|
||||
}
|
||||
pub mod task {
|
||||
pub enum Poll<T> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue