]> git.lizzy.rs Git - rust.git/blob - tests/ui/pptypedef.rs
Rollup merge of #106605 - notriddle:notriddle/outdated-rustbook, r=GuillaumeGomez
[rust.git] / tests / ui / pptypedef.rs
1 fn let_in<T, F>(x: T, f: F) where F: FnOnce(T) {}
2
3 fn main() {
4     let_in(3u32, |i| { assert!(i == 3i32); });
5     //~^ ERROR mismatched types
6     //~| expected `u32`, found `i32`
7
8     let_in(3i32, |i| { assert!(i == 3u32); });
9     //~^ ERROR mismatched types
10     //~| expected `i32`, found `u32`
11 }