mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Find IntoFuture::IntoFuture's poll method
This commit is contained in:
parent
dc3219bb11
commit
cebf95718c
4 changed files with 65 additions and 10 deletions
|
@ -1664,6 +1664,40 @@ fn f() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn goto_await_into_future_poll() {
|
||||
check(
|
||||
r#"
|
||||
//- minicore: future
|
||||
|
||||
struct Futurable;
|
||||
|
||||
impl core::future::IntoFuture for Futurable {
|
||||
type IntoFuture = MyFut;
|
||||
}
|
||||
|
||||
struct MyFut;
|
||||
|
||||
impl core::future::Future for MyFut {
|
||||
type Output = ();
|
||||
|
||||
fn poll(
|
||||
//^^^^
|
||||
self: std::pin::Pin<&mut Self>,
|
||||
cx: &mut std::task::Context<'_>
|
||||
) -> std::task::Poll<Self::Output>
|
||||
{
|
||||
()
|
||||
}
|
||||
}
|
||||
|
||||
fn f() {
|
||||
Futurable.await$0;
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn goto_try_op() {
|
||||
check(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue