mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
11 lines
281 B
Rust
11 lines
281 B
Rust
#![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);
|
|
}
|