os-rust/tests/ui/pptypedef.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
298 B
Rust
Raw Normal View History

2015-01-03 10:45:00 -05:00
fn let_in<T, F>(x: T, f: F) where F: FnOnce(T) {}
2012-05-04 12:33:04 -07:00
fn main() {
2015-01-31 17:23:42 +01:00
let_in(3u32, |i| { assert!(i == 3i32); });
2015-01-12 01:01:44 -05:00
//~^ ERROR mismatched types
//~| expected `u32`, found `i32`
2015-01-31 17:23:42 +01:00
let_in(3i32, |i| { assert!(i == 3u32); });
2015-01-12 01:01:44 -05:00
//~^ ERROR mismatched types
//~| expected `i32`, found `u32`
}