]> git.lizzy.rs Git - rust.git/blob - src/test/ui/cast-char.rs
Rollup merge of #61207 - taiki-e:arbitrary_self_types-lifetime-elision-2, r=Centril
[rust.git] / src / test / ui / cast-char.rs
1 #![deny(overflowing_literals)]
2
3 fn main() {
4     const XYZ: char = 0x1F888 as char;
5     //~^ ERROR only `u8` can be cast into `char`
6     const XY: char = 129160 as char;
7     //~^ ERROR only `u8` can be cast into `char`
8     const ZYX: char = '\u{01F888}';
9     println!("{}", XYZ);
10 }