Fixed diagnostics for coroutines with () as input.
This commit is contained in:
parent
7042c269c1
commit
986e20d5bb
3 changed files with 60 additions and 36 deletions
11
tests/ui/coroutine/arg-count-mismatch-on-unit-input.rs
Normal file
11
tests/ui/coroutine/arg-count-mismatch-on-unit-input.rs
Normal 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() { }
|
Loading…
Add table
Add a link
Reference in a new issue