1
Fork 0

Fixed diagnostics for coroutines with () as input.

This commit is contained in:
Virginia Senioria 2024-09-25 07:34:53 +00:00
parent 7042c269c1
commit 986e20d5bb
3 changed files with 60 additions and 36 deletions

View file

@ -0,0 +1,11 @@
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
use std::ops::Coroutine;
fn foo() -> impl Coroutine<u8> {
//~^ ERROR type mismatch in coroutine arguments
#[coroutine]
|_: ()| {}
}
fn main() { }