Implement special-cased projection error message for some common traits

This commit is contained in:
Michael Goulet 2022-07-03 20:17:08 +00:00
parent d394408fb3
commit 750f04d309
25 changed files with 80 additions and 43 deletions

View file

@ -15,7 +15,7 @@ fn return_targets_async_block_not_fn() -> u8 {
return 0u8;
};
let _: &dyn Future<Output = ()> = &block;
//~^ ERROR type mismatch
//~^ ERROR expected `impl Future<Output = u8>` to be a future that yields `()`, but it actually yields `u8`
}
async fn return_targets_async_block_not_async_fn() -> u8 {
@ -24,7 +24,7 @@ async fn return_targets_async_block_not_async_fn() -> u8 {
return 0u8;
};
let _: &dyn Future<Output = ()> = &block;
//~^ ERROR type mismatch resolving `<impl Future<Output = u8> as Future>::Output == ()`
//~^ ERROR expected `impl Future<Output = u8>` to be a future that yields `()`, but it actually yields `u8`
}
fn no_break_in_async_block() {