summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/match-prev-arm-needing-semi.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/match-prev-arm-needing-semi.rs')
-rw-r--r--tests/ui/suggestions/match-prev-arm-needing-semi.rs26
1 files changed, 8 insertions, 18 deletions
diff --git a/tests/ui/suggestions/match-prev-arm-needing-semi.rs b/tests/ui/suggestions/match-prev-arm-needing-semi.rs
index 8c8abe047..11463c453 100644
--- a/tests/ui/suggestions/match-prev-arm-needing-semi.rs
+++ b/tests/ui/suggestions/match-prev-arm-needing-semi.rs
@@ -13,18 +13,9 @@ fn extra_semicolon() {
};
}
-async fn async_dummy() {} //~ NOTE checked the `Output` of this `async fn`, found opaque type
-//~| NOTE while checking the return type of the `async fn`
-//~| NOTE in this expansion of desugaring of `async` block or function
-//~| NOTE checked the `Output` of this `async fn`, expected opaque type
-//~| NOTE while checking the return type of the `async fn`
-//~| NOTE in this expansion of desugaring of `async` block or function
-async fn async_dummy2() {} //~ NOTE checked the `Output` of this `async fn`, found opaque type
-//~| NOTE checked the `Output` of this `async fn`, found opaque type
-//~| NOTE while checking the return type of the `async fn`
-//~| NOTE in this expansion of desugaring of `async` block or function
-//~| NOTE while checking the return type of the `async fn`
-//~| NOTE in this expansion of desugaring of `async` block or function
+async fn async_dummy() {}
+
+async fn async_dummy2() {}
async fn async_extra_semicolon_same() {
let _ = match true { //~ NOTE `match` arms have incompatible types
@@ -33,8 +24,8 @@ async fn async_extra_semicolon_same() {
//~^ HELP consider removing this semicolon
}
false => async_dummy(), //~ ERROR `match` arms have incompatible types
- //~^ NOTE expected `()`, found opaque type
- //~| NOTE expected unit type `()`
+ //~^ NOTE expected `()`, found future
+ //~| NOTE calling an async function returns a future
//~| HELP consider `await`ing on the `Future`
};
}
@@ -46,8 +37,8 @@ async fn async_extra_semicolon_different() {
//~^ HELP consider removing this semicolon
}
false => async_dummy2(), //~ ERROR `match` arms have incompatible types
- //~^ NOTE expected `()`, found opaque type
- //~| NOTE expected unit type `()`
+ //~^ NOTE expected `()`, found future
+ //~| NOTE calling an async function returns a future
//~| HELP consider `await`ing on the `Future`
};
}
@@ -57,8 +48,7 @@ async fn async_different_futures() {
true => async_dummy(), //~ NOTE this is found to be
//~| HELP consider `await`ing on both `Future`s
false => async_dummy2(), //~ ERROR `match` arms have incompatible types
- //~^ NOTE expected opaque type, found a different opaque type
- //~| NOTE expected opaque type `impl Future<Output = ()>`
+ //~^ NOTE expected future, found a different future
//~| NOTE distinct uses of `impl Trait` result in different opaque types
};
}