summary refs log tree commit diff
path: root/src/test/ui/cast_char.rs
blob: 8c319af9c96e7271b856457ac205d7dd40ed3886 (plain)
1
2
3
4
5
6
7
8
9
10
#![deny(overflowing_literals)]

fn main() {
    const XYZ: char = 0x1F888 as char;
    //~^ ERROR only u8 can be cast into char
    const XY: char = 129160 as char;
    //~^ ERROR only u8 can be cast into char
    const ZYX: char = '\u{01F888}';
    println!("{}", XYZ);
}