3 #![warn(clippy::manual_async_fn)]
6 use std::future::Future;
8 fn fut() -> impl Future<Output = i32> {
12 fn empty_fut() -> impl Future<Output = ()> {
16 fn core_fut() -> impl core::future::Future<Output = i32> {
21 fn has_other_stmts() -> impl core::future::Future<Output = i32> {
32 async fn already_async() -> impl Future<Output = i32> {
38 fn inh_fut() -> impl Future<Output = i32> {
40 // NOTE: this code is here just to check that the indentation is correct in the suggested fix
55 fn not_fut(&self) -> i32 {
60 fn has_other_stmts() -> impl core::future::Future<Output = i32> {
66 async fn already_async(&self) -> impl Future<Output = i32> {
71 // Tests related to lifetime capture
73 fn elided(_: &i32) -> impl Future<Output = i32> + '_ {
78 fn elided_not_bound(_: &i32) -> impl Future<Output = i32> {
82 fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> + 'a + 'b {
87 #[allow(clippy::needless_lifetimes)]
88 fn explicit_not_bound<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> {
94 use std::future::Future;
98 fn f(&self) -> impl Future<Output = ()> {