mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
29 lines
395 B
Rust
29 lines
395 B
Rust
fn take(_f: impl FnMut(i32)) {}
|
|
|
|
fn test1(f: impl FnMut(u32)) {
|
|
take(f)
|
|
//~^ ERROR [E0277]
|
|
}
|
|
|
|
fn test2(f: impl FnMut(i32, i32)) {
|
|
take(f)
|
|
//~^ ERROR [E0277]
|
|
}
|
|
|
|
fn test3(f: impl FnMut()) {
|
|
take(f)
|
|
//~^ ERROR [E0277]
|
|
}
|
|
|
|
fn test4(f: impl FnOnce(i32)) {
|
|
take(f)
|
|
//~^ ERROR [E0277]
|
|
}
|
|
|
|
fn test5(f: impl FnOnce(u32)) {
|
|
take(f)
|
|
//~^ ERROR [E0277]
|
|
}
|
|
|
|
fn main() {}
|