Skip to content

Commit b32cabf

Browse files
committed
Update test output.
1 parent 85cc471 commit b32cabf

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/test/ui/async-await/proper-span-for-type-error.fixed

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
async fn a() {}
66

77
async fn foo() -> Result<(), i32> {
8-
Ok(a().await) //~ ERROR mismatched types
8+
a().await;
9+
Ok(()) //~ ERROR mismatched types
910
}
1011

1112
fn main() {}

src/test/ui/async-await/proper-span-for-type-error.stderr

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ LL | a().await
66
|
77
= note: expected enum `Result<(), i32>`
88
found unit type `()`
9-
help: try wrapping the expression in `Ok`
9+
help: try adding an expression at the end of the block
10+
|
11+
LL ~ a().await;
12+
LL ~ Ok(())
1013
|
11-
LL | Ok(a().await)
12-
| +++ +
1314

1415
error: aborting due to previous error
1516

0 commit comments

Comments
 (0)