2019-04-27 11:56:57 +00:00
|
|
|
error: only `u8` can be cast into `char`
|
2019-07-06 15:15:27 +00:00
|
|
|
--> $DIR/cast-char.rs:4:23
|
2018-02-06 13:57:08 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | const XYZ: char = 0x1F888 as char;
|
2019-04-27 11:56:57 +00:00
|
|
|
| ^^^^^^^^^^^^^^^ help: use a `char` literal instead: `'\u{1F888}'`
|
2018-02-06 13:57:08 +00:00
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2019-07-06 15:15:27 +00:00
|
|
|
--> $DIR/cast-char.rs:1:9
|
2018-02-06 13:57:08 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | #![deny(overflowing_literals)]
|
2018-02-06 13:57:08 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2019-04-27 11:56:57 +00:00
|
|
|
error: only `u8` can be cast into `char`
|
2019-07-06 15:15:27 +00:00
|
|
|
--> $DIR/cast-char.rs:6:22
|
2018-02-06 13:57:08 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | const XY: char = 129160 as char;
|
2019-04-27 11:56:57 +00:00
|
|
|
| ^^^^^^^^^^^^^^ help: use a `char` literal instead: `'\u{1F888}'`
|
2018-02-06 13:57:08 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|