2018-02-06 14:57:08 +01:00
|
|
|
#![deny(overflowing_literals)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
const XYZ: char = 0x1F888 as char;
|
2018-02-21 16:12:23 +01:00
|
|
|
//~^ ERROR only u8 can be cast into char
|
2018-02-06 14:57:08 +01:00
|
|
|
const XY: char = 129160 as char;
|
2018-02-21 16:12:23 +01:00
|
|
|
//~^ ERROR only u8 can be cast into char
|
2018-02-06 14:57:08 +01:00
|
|
|
const ZYX: char = '\u{01F888}';
|
|
|
|
println!("{}", XYZ);
|
|
|
|
}
|