rust/tests/ui/parser/bad-char-literals.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.0 KiB
Plaintext
Raw Normal View History

error: character constant must be escaped: `'`
2020-01-08 18:25:42 +00:00
--> $DIR/bad-char-literals.rs:6:6
2018-10-20 20:36:17 +00:00
|
LL | ''';
| ^
|
help: escape the character
|
LL | '\'';
| ~~
2018-10-20 20:36:17 +00:00
error: character constant must be escaped: `\n`
2020-01-08 18:25:42 +00:00
--> $DIR/bad-char-literals.rs:10:6
2018-10-20 20:36:17 +00:00
|
LL | '
| ______^
LL | | ';
| |_
|
help: escape the character
|
LL | '\n';
| ++
2018-10-20 20:36:17 +00:00
error: character constant must be escaped: `\r`
2020-01-08 18:25:42 +00:00
--> $DIR/bad-char-literals.rs:15:6
2018-10-20 20:36:17 +00:00
|
LL | '␍';
| ^
|
help: escape the character
|
LL | '\r';
| ++
2018-10-20 20:36:17 +00:00
error: character literal may only contain one codepoint
--> $DIR/bad-char-literals.rs:18:5
|
LL | '-␀-';
| ^^^^^
|
help: if you meant to write a string literal, use double quotes
|
LL | "-␀-";
| ~ ~
error: character constant must be escaped: `\t`
--> $DIR/bad-char-literals.rs:21:6
2018-10-20 20:36:17 +00:00
|
LL | ' ';
| ^^^^
|
help: escape the character
|
LL | '\t';
| ++
2018-10-20 20:36:17 +00:00
error: aborting due to 5 previous errors
2018-10-20 20:36:17 +00:00