blob: e28d323f8837135476e0f6ccbf50241183d56c79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
fn let_in<T, F>(x: T, f: F) where F: FnOnce(T) {}
fn main() {
let_in(3u32, |i| { assert!(i == 3i32); });
//~^ ERROR mismatched types
//~| expected `u32`, found `i32`
let_in(3i32, |i| { assert!(i == 3u32); });
//~^ ERROR mismatched types
//~| expected `i32`, found `u32`
}
|