|
|
|
@@ -9,6 +9,9 @@ LL | fn fut() -> impl Future<Output = i32> {
|
|
|
|
|
help: make the function `async` and return the output of the future directly
|
|
|
|
|
|
|
|
|
|
|
LL - fn fut() -> impl Future<Output = i32> {
|
|
|
|
|
LL -
|
|
|
|
|
LL - async { 42 }
|
|
|
|
|
LL - }
|
|
|
|
|
LL + async fn fut() -> i32 { 42 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -21,6 +24,9 @@ LL | fn fut2() ->impl Future<Output = i32> {
|
|
|
|
|
help: make the function `async` and return the output of the future directly
|
|
|
|
|
|
|
|
|
|
|
LL - fn fut2() ->impl Future<Output = i32> {
|
|
|
|
|
LL -
|
|
|
|
|
LL - async { 42 }
|
|
|
|
|
LL - }
|
|
|
|
|
LL + async fn fut2() -> i32 { 42 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -33,6 +39,9 @@ LL | fn fut3()-> impl Future<Output = i32> {
|
|
|
|
|
help: make the function `async` and return the output of the future directly
|
|
|
|
|
|
|
|
|
|
|
LL - fn fut3()-> impl Future<Output = i32> {
|
|
|
|
|
LL -
|
|
|
|
|
LL - async { 42 }
|
|
|
|
|
LL - }
|
|
|
|
|
LL + async fn fut3() -> i32 { 42 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -45,6 +54,9 @@ LL | fn empty_fut() -> impl Future<Output = ()> {
|
|
|
|
|
help: make the function `async` and return the output of the future directly
|
|
|
|
|
|
|
|
|
|
|
LL - fn empty_fut() -> impl Future<Output = ()> {
|
|
|
|
|
LL -
|
|
|
|
|
LL - async {}
|
|
|
|
|
LL - }
|
|
|
|
|
LL + async fn empty_fut() {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -57,6 +69,9 @@ LL | fn empty_fut2() ->impl Future<Output = ()> {
|
|
|
|
|
help: make the function `async` and return the output of the future directly
|
|
|
|
|
|
|
|
|
|
|
LL - fn empty_fut2() ->impl Future<Output = ()> {
|
|
|
|
|
LL -
|
|
|
|
|
LL - async {}
|
|
|
|
|
LL - }
|
|
|
|
|
LL + async fn empty_fut2() {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -69,6 +84,9 @@ LL | fn empty_fut3()-> impl Future<Output = ()> {
|
|
|
|
|
help: make the function `async` and return the output of the future directly
|
|
|
|
|
|
|
|
|
|
|
LL - fn empty_fut3()-> impl Future<Output = ()> {
|
|
|
|
|
LL -
|
|
|
|
|
LL - async {}
|
|
|
|
|
LL - }
|
|
|
|
|
LL + async fn empty_fut3() {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -81,6 +99,9 @@ LL | fn core_fut() -> impl core::future::Future<Output = i32> {
|
|
|
|
|
help: make the function `async` and return the output of the future directly
|
|
|
|
|
|
|
|
|
|
|
LL - fn core_fut() -> impl core::future::Future<Output = i32> {
|
|
|
|
|
LL -
|
|
|
|
|
LL - async move { 42 }
|
|
|
|
|
LL - }
|
|
|
|
|
LL + async fn core_fut() -> i32 { 42 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -116,6 +137,9 @@ LL | fn elided(_: &i32) -> impl Future<Output = i32> + '_ {
|
|
|
|
|
help: make the function `async` and return the output of the future directly
|
|
|
|
|
|
|
|
|
|
|
LL - fn elided(_: &i32) -> impl Future<Output = i32> + '_ {
|
|
|
|
|
LL -
|
|
|
|
|
LL - async { 42 }
|
|
|
|
|
LL - }
|
|
|
|
|
LL + async fn elided(_: &i32) -> i32 { 42 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -128,6 +152,9 @@ LL | fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> +
|
|
|
|
|
help: make the function `async` and return the output of the future directly
|
|
|
|
|
|
|
|
|
|
|
LL - fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> + 'a + 'b {
|
|
|
|
|
LL -
|
|
|
|
|
LL - async { 42 }
|
|
|
|
|
LL - }
|
|
|
|
|
LL + async fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> i32 { 42 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -140,6 +167,9 @@ LL | pub fn issue_10450() -> impl Future<Output = i32> {
|
|
|
|
|
help: make the function `async` and return the output of the future directly
|
|
|
|
|
|
|
|
|
|
|
LL - pub fn issue_10450() -> impl Future<Output = i32> {
|
|
|
|
|
LL -
|
|
|
|
|
LL - async { 42 }
|
|
|
|
|
LL - }
|
|
|
|
|
LL + pub async fn issue_10450() -> i32 { 42 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -152,6 +182,9 @@ LL | pub(crate) fn issue_10450_2() -> impl Future<Output = i32> {
|
|
|
|
|
help: make the function `async` and return the output of the future directly
|
|
|
|
|
|
|
|
|
|
|
LL - pub(crate) fn issue_10450_2() -> impl Future<Output = i32> {
|
|
|
|
|
LL -
|
|
|
|
|
LL - async { 42 }
|
|
|
|
|
LL - }
|
|
|
|
|
LL + pub(crate) async fn issue_10450_2() -> i32 { 42 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -164,6 +197,9 @@ LL | pub(self) fn issue_10450_3() -> impl Future<Output = i32> {
|
|
|
|
|
help: make the function `async` and return the output of the future directly
|
|
|
|
|
|
|
|
|
|
|
LL - pub(self) fn issue_10450_3() -> impl Future<Output = i32> {
|
|
|
|
|
LL -
|
|
|
|
|
LL - async { 42 }
|
|
|
|
|
LL - }
|
|
|
|
|
LL + pub(self) async fn issue_10450_3() -> i32 { 42 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|