about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/manual_async_fn.stderr
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-07-09 22:30:26 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-02-10 20:21:39 +0000
commitf0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d (patch)
treee97d87013709bda13934fdc452a2a459a069876a /src/tools/clippy/tests/ui/manual_async_fn.stderr
parent8c04e395952022a451138dc4dbead6dd6ae65203 (diff)
downloadrust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.tar.gz
rust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.zip
Show diff suggestion format on verbose replacement
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
  --> $DIR/attempted-access-non-fatal.rs:7:15
   |
LL |     let _ = 2.l;
   |               ^
   |
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
   |
LL -     let _ = 2.l;
LL +     let _ = 2.0f64;
   |
```
Diffstat (limited to 'src/tools/clippy/tests/ui/manual_async_fn.stderr')
-rw-r--r--src/tools/clippy/tests/ui/manual_async_fn.stderr60
1 files changed, 36 insertions, 24 deletions
diff --git a/src/tools/clippy/tests/ui/manual_async_fn.stderr b/src/tools/clippy/tests/ui/manual_async_fn.stderr
index 68a97243436..a7cfc30fb69 100644
--- a/src/tools/clippy/tests/ui/manual_async_fn.stderr
+++ b/src/tools/clippy/tests/ui/manual_async_fn.stderr
@@ -8,8 +8,9 @@ LL | fn fut() -> impl Future<Output = i32> {
    = help: to override `-D warnings` add `#[allow(clippy::manual_async_fn)]`
 help: make the function `async` and return the output of the future directly
    |
-LL | async fn fut() -> i32 { 42 }
-   | ~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
+LL - fn fut() -> impl Future<Output = i32> {
+LL + async fn fut() -> i32 { 42 }
+   |
 
 error: this function can be simplified using the `async fn` syntax
   --> tests/ui/manual_async_fn.rs:11:1
@@ -19,8 +20,9 @@ LL | fn fut2() ->impl Future<Output = i32> {
    |
 help: make the function `async` and return the output of the future directly
    |
-LL | async fn fut2() -> i32 { 42 }
-   | ~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
+LL - fn fut2() ->impl Future<Output = i32> {
+LL + async fn fut2() -> i32 { 42 }
+   |
 
 error: this function can be simplified using the `async fn` syntax
   --> tests/ui/manual_async_fn.rs:16:1
@@ -30,8 +32,9 @@ LL | fn fut3()-> impl Future<Output = i32> {
    |
 help: make the function `async` and return the output of the future directly
    |
-LL | async fn fut3() -> i32 { 42 }
-   | ~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
+LL - fn fut3()-> impl Future<Output = i32> {
+LL + async fn fut3() -> i32 { 42 }
+   |
 
 error: this function can be simplified using the `async fn` syntax
   --> tests/ui/manual_async_fn.rs:20:1
@@ -41,8 +44,9 @@ LL | fn empty_fut() -> impl Future<Output = ()> {
    |
 help: make the function `async` and return the output of the future directly
    |
-LL | async fn empty_fut() {}
-   | ~~~~~~~~~~~~~~~~~~~~ ~~
+LL - fn empty_fut() -> impl Future<Output = ()> {
+LL + async fn empty_fut() {}
+   |
 
 error: this function can be simplified using the `async fn` syntax
   --> tests/ui/manual_async_fn.rs:25:1
@@ -52,8 +56,9 @@ LL | fn empty_fut2() ->impl Future<Output = ()> {
    |
 help: make the function `async` and return the output of the future directly
    |
-LL | async fn empty_fut2() {}
-   | ~~~~~~~~~~~~~~~~~~~~~ ~~
+LL - fn empty_fut2() ->impl Future<Output = ()> {
+LL + async fn empty_fut2() {}
+   |
 
 error: this function can be simplified using the `async fn` syntax
   --> tests/ui/manual_async_fn.rs:30:1
@@ -63,8 +68,9 @@ LL | fn empty_fut3()-> impl Future<Output = ()> {
    |
 help: make the function `async` and return the output of the future directly
    |
-LL | async fn empty_fut3() {}
-   | ~~~~~~~~~~~~~~~~~~~~~ ~~
+LL - fn empty_fut3()-> impl Future<Output = ()> {
+LL + async fn empty_fut3() {}
+   |
 
 error: this function can be simplified using the `async fn` syntax
   --> tests/ui/manual_async_fn.rs:34:1
@@ -74,8 +80,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 | async fn core_fut() -> i32 { 42 }
-   | ~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
+LL - fn core_fut() -> impl core::future::Future<Output = i32> {
+LL + async fn core_fut() -> i32 { 42 }
+   |
 
 error: this function can be simplified using the `async fn` syntax
   --> tests/ui/manual_async_fn.rs:56:5
@@ -108,8 +115,9 @@ LL | fn elided(_: &i32) -> impl Future<Output = i32> + '_ {
    |
 help: make the function `async` and return the output of the future directly
    |
-LL | async fn elided(_: &i32) -> i32 { 42 }
-   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
+LL - fn elided(_: &i32) -> impl Future<Output = i32> + '_ {
+LL + async fn elided(_: &i32) -> i32 { 42 }
+   |
 
 error: this function can be simplified using the `async fn` syntax
   --> tests/ui/manual_async_fn.rs:101:1
@@ -119,8 +127,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 | async fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> i32 { 42 }
-   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
+LL - fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> + 'a + 'b {
+LL + async fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> i32 { 42 }
+   |
 
 error: this function can be simplified using the `async fn` syntax
   --> tests/ui/manual_async_fn.rs:130:1
@@ -130,8 +139,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 async fn issue_10450() -> i32 { 42 }
-   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
+LL - pub fn issue_10450() -> impl Future<Output = i32> {
+LL + pub async fn issue_10450() -> i32 { 42 }
+   |
 
 error: this function can be simplified using the `async fn` syntax
   --> tests/ui/manual_async_fn.rs:134:1
@@ -141,8 +151,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) async fn issue_10450_2() -> i32 { 42 }
-   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
+LL - pub(crate) fn issue_10450_2() -> impl Future<Output = i32> {
+LL + pub(crate) async fn issue_10450_2() -> i32 { 42 }
+   |
 
 error: this function can be simplified using the `async fn` syntax
   --> tests/ui/manual_async_fn.rs:138:1
@@ -152,8 +163,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) async fn issue_10450_3() -> i32 { 42 }
-   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
+LL - pub(self) fn issue_10450_3() -> impl Future<Output = i32> {
+LL + pub(self) async fn issue_10450_3() -> i32 { 42 }
+   |
 
 error: aborting due to 13 previous errors