]> git.lizzy.rs Git - rust.git/blob - tests/ui/types.rs
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / types.rs
1 // run-rustfix
2
3 #![allow(dead_code, unused_variables)]
4
5 // should not warn on lossy casting in constant types
6 // because not supported yet
7 const C: i32 = 42;
8 const C_I64: i64 = C as i64;
9
10 fn main() {
11     // should suggest i64::from(c)
12     let c: i32 = 42;
13     let c_i64: i64 = c as i64;
14 }