summaryrefslogtreecommitdiffstats
path: root/src/test/ui/cast/cast-char.rs
blob: 9634ed56f7b723149d93903a91dc287886a2f2cd (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);
}