summaryrefslogtreecommitdiffstats
path: root/src/test/ui/mismatched_types/numeric-literal-cast.rs
blob: 69cfe262fdf423c32af899046868e0ab68b70383 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
fn foo(_: u16) {}
fn foo1(_: f64) {}
fn foo2(_: i32) {}

fn main() {
    foo(1u8);
//~^ ERROR mismatched types
    foo1(2f32);
//~^ ERROR mismatched types
    foo2(3i16);
//~^ ERROR mismatched types
}