summaryrefslogtreecommitdiffstats
path: root/tests/ui/cast/cast-char.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/cast/cast-char.stderr')
-rw-r--r--tests/ui/cast/cast-char.stderr20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/cast/cast-char.stderr b/tests/ui/cast/cast-char.stderr
new file mode 100644
index 000000000..211937c9d
--- /dev/null
+++ b/tests/ui/cast/cast-char.stderr
@@ -0,0 +1,20 @@
+error: only `u8` can be cast into `char`
+ --> $DIR/cast-char.rs:4:23
+ |
+LL | const XYZ: char = 0x1F888 as char;
+ | ^^^^^^^^^^^^^^^ help: use a `char` literal instead: `'\u{1F888}'`
+ |
+note: the lint level is defined here
+ --> $DIR/cast-char.rs:1:9
+ |
+LL | #![deny(overflowing_literals)]
+ | ^^^^^^^^^^^^^^^^^^^^
+
+error: only `u8` can be cast into `char`
+ --> $DIR/cast-char.rs:6:22
+ |
+LL | const XY: char = 129160 as char;
+ | ^^^^^^^^^^^^^^ help: use a `char` literal instead: `'\u{1F888}'`
+
+error: aborting due to 2 previous errors
+