]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/multiple-fn-bounds.rs
Rollup merge of #107248 - erikdesjardins:addrspace, r=oli-obk
[rust.git] / tests / ui / closures / multiple-fn-bounds.rs
1 fn foo<F: Fn(&char) -> bool + Fn(char) -> bool>(f: F) {
2     //~^ NOTE required by a bound in `foo`
3     //~| NOTE required by this bound in `foo`
4     //~| NOTE closure inferred to have a different signature due to this bound
5     todo!();
6 }
7
8 fn main() {
9     let v = true;
10     foo(move |x| v);
11     //~^ ERROR type mismatch in closure arguments
12     //~| NOTE expected closure signature
13     //~| NOTE expected due to this
14     //~| NOTE found signature defined here
15 }