about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2022-03-02 19:30:25 +0100
committerMara Bos <m-ou.se@m-ou.se>2022-03-02 19:30:25 +0100
commitb32cabf458a67bdf6b511d385a315d23547dd157 (patch)
treee0eb3b1da212fd181d64e6b3703c98faae96990c /src
parent85cc4710efe60ce52781a40fab82860c1b81070b (diff)
downloadrust-b32cabf458a67bdf6b511d385a315d23547dd157.tar.gz
rust-b32cabf458a67bdf6b511d385a315d23547dd157.zip
Update test output.
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/async-await/proper-span-for-type-error.fixed3
-rw-r--r--src/test/ui/async-await/proper-span-for-type-error.stderr7
2 files changed, 6 insertions, 4 deletions
diff --git a/src/test/ui/async-await/proper-span-for-type-error.fixed b/src/test/ui/async-await/proper-span-for-type-error.fixed
index 1f1e1184dcc..7d43b575d2f 100644
--- a/src/test/ui/async-await/proper-span-for-type-error.fixed
+++ b/src/test/ui/async-await/proper-span-for-type-error.fixed
@@ -5,7 +5,8 @@
 async fn a() {}
 
 async fn foo() -> Result<(), i32> {
-    Ok(a().await) //~ ERROR mismatched types
+    a().await;
+    Ok(()) //~ ERROR mismatched types
 }
 
 fn main() {}
diff --git a/src/test/ui/async-await/proper-span-for-type-error.stderr b/src/test/ui/async-await/proper-span-for-type-error.stderr
index 611dc0407bf..25f05156ce2 100644
--- a/src/test/ui/async-await/proper-span-for-type-error.stderr
+++ b/src/test/ui/async-await/proper-span-for-type-error.stderr
@@ -6,10 +6,11 @@ LL |     a().await
    |
    = note:   expected enum `Result<(), i32>`
            found unit type `()`
-help: try wrapping the expression in `Ok`
+help: try adding an expression at the end of the block
+   |
+LL ~     a().await;
+LL ~     Ok(())
    |
-LL |     Ok(a().await)
-   |     +++         +
 
 error: aborting due to previous error