]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mismatched_types/numeric-literal-cast.rs
Auto merge of #76110 - FedericoPonzi:convert-openoptions-cint, r=JoshTriplett
[rust.git] / src / test / 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 }