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