mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
16 lines
462 B
Rust
16 lines
462 B
Rust
fn foo<F: Fn(&char) -> bool + Fn(char) -> bool>(f: F) {
|
|
//~^ NOTE required by a bound in `foo`
|
|
//~| NOTE required by this bound in `foo`
|
|
//~| NOTE closure inferred to have a different signature due to this bound
|
|
todo!();
|
|
}
|
|
|
|
fn main() {
|
|
let v = true;
|
|
foo(move |x| v);
|
|
//~^ ERROR type mismatch in closure arguments
|
|
//~| NOTE expected closure signature
|
|
//~| NOTE expected due to this
|
|
//~| NOTE found signature defined here
|
|
}
|