rust/tests/ui/cast/cast-int-to-char.rs

10 lines
197 B
Rust
Raw Normal View History

2021-11-28 15:46:53 -06:00
fn foo<T>(_t: T) {}
fn main() {
foo::<u32>('0'); //~ ERROR
foo::<i32>('0'); //~ ERROR
foo::<u64>('0'); //~ ERROR
foo::<i64>('0'); //~ ERROR
foo::<char>(0u32); //~ ERROR
}