]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/parser/lex-bad-char-literals-5.rs
New upstream version 1.34.2+dfsg1
[rustc.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
+}