File tree 2 files changed +31
-0
lines changed
2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ #![ allow( unused) ]
2
+ fn main ( ) {
3
+ let _foo = b' hello\0 ' ;
4
+ //~^ ERROR character literal may only contain one codepoint
5
+ //~| HELP if you meant to write a byte string literal, use double quotes
6
+ let _bar = ' hello' ;
7
+ //~^ ERROR character literal may only contain one codepoint
8
+ //~| HELP if you meant to write a `str` literal, use double quotes
9
+ }
Original file line number Diff line number Diff line change
1
+ error: character literal may only contain one codepoint
2
+ --> $DIR/issue-64732.rs:3:17
3
+ |
4
+ LL | let _foo = b'hello\0';
5
+ | ^^^^^^^^^
6
+ help: if you meant to write a byte string literal, use double quotes
7
+ |
8
+ LL | let _foo = b"hello\0";
9
+ | ^^^^^^^^^
10
+
11
+ error: character literal may only contain one codepoint
12
+ --> $DIR/issue-64732.rs:6:16
13
+ |
14
+ LL | let _bar = 'hello';
15
+ | ^^^^^^^
16
+ help: if you meant to write a `str` literal, use double quotes
17
+ |
18
+ LL | let _bar = "hello";
19
+ | ^^^^^^^
20
+
21
+ error: aborting due to 2 previous errors
22
+
You can’t perform that action at this time.
0 commit comments