error[E0631]: type mismatch in closure arguments --> $DIR/E0631.rs:7:5 | LL | foo(|_: isize| {}); | ^^^ ---------- found signature of `fn(isize) -> _` | | | expected signature of `fn(usize) -> _` | note: required by a bound in `foo` --> $DIR/E0631.rs:3:11 | LL | fn foo(_: F) {} | ^^^^^^^^^ required by this bound in `foo` error[E0631]: type mismatch in closure arguments --> $DIR/E0631.rs:8:5 | LL | bar(|_: isize| {}); | ^^^ ---------- found signature of `fn(isize) -> _` | | | expected signature of `fn(usize) -> _` | note: required by a bound in `bar` --> $DIR/E0631.rs:4:11 | LL | fn bar>(_: F) {} | ^^^^^^^^^ required by this bound in `bar` error[E0631]: type mismatch in function arguments --> $DIR/E0631.rs:9:9 | LL | fn f(_: u64) {} | ------------ found signature of `fn(u64) -> _` ... LL | foo(f); | --- ^ expected signature of `fn(usize) -> _` | | | required by a bound introduced by this call | note: required by a bound in `foo` --> $DIR/E0631.rs:3:11 | LL | fn foo(_: F) {} | ^^^^^^^^^ required by this bound in `foo` error[E0631]: type mismatch in function arguments --> $DIR/E0631.rs:10:9 | LL | fn f(_: u64) {} | ------------ found signature of `fn(u64) -> _` ... LL | bar(f); | --- ^ expected signature of `fn(usize) -> _` | | | required by a bound introduced by this call | note: required by a bound in `bar` --> $DIR/E0631.rs:4:11 | LL | fn bar>(_: F) {} | ^^^^^^^^^ required by this bound in `bar` error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0631`.