forked from rust-lang/rust
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create new error code E0762 for unterminated char literals
- Loading branch information
1 parent
bb86748
commit 50a42fe
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
A character literal wasn't ended with a quote. | ||
|
||
Erroneous code example: | ||
|
||
```compile_fail,E0762 | ||
static C: char = '●; // error! | ||
``` | ||
|
||
To fix this error, add the missing quote: | ||
|
||
``` | ||
static C: char = '●'; // ok! | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters