]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/parser/lex-bad-char-literals-5.rs
Rollup merge of #67005 - andrewbanchich:master, r=joshtriplett
[rust.git] / src / test / ui / parser / lex-bad-char-literals-5.rs
index 247289ea4d54b45fb1cce0e52ebb4d96f7efec50..0c4339edc4fa7f9d17dea6da00e97f56d0b941ed 100644 (file)
@@ -1,8 +1,7 @@
-//
-// This test needs to the last one appearing in this file as it kills the parser
-static c: char =
-    '\x10\x10'  //~ ERROR: character literal may only contain one codepoint
-                //~| ERROR: mismatched types
-;
+static c: char = '\x10\x10';
+//~^ ERROR: character literal may only contain one codepoint
 
-fn main() {}
+fn main() {
+    let ch: &str = '\x10\x10';
+    //~^ ERROR: character literal may only contain one codepoint
+}