blob: ce9159b53e0f0a5b147e1e5f87df731e217e10ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Regression test for #88653, where a confusing warning about a
// type mismatch in generator arguments was issued.
#![feature(generators, generator_trait)]
use std::ops::Generator;
fn foo(bar: bool) -> impl Generator<(bool,)> {
//~^ ERROR: type mismatch in generator arguments [E0631]
//~| NOTE: expected signature of `fn((bool,)) -> _`
|bar| {
//~^ NOTE: found signature of `fn(bool) -> _`
if bar {
yield bar;
}
}
}
fn main() {}
|