]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/numeric-literal-cast.rs
Rollup merge of #107700 - jyn514:tools-builder, r=Mark-Simulacrum
[rust.git] / tests / ui / mismatched_types / numeric-literal-cast.rs
1 fn foo(_: u16) {}
2 fn foo1(_: f64) {}
3 fn foo2(_: i32) {}
4
5 fn main() {
6     foo(1u8);
7 //~^ ERROR mismatched types
8     foo1(2f32);
9 //~^ ERROR mismatched types
10     foo2(3i16);
11 //~^ ERROR mismatched types
12 }