E0008: unterminated char literal
Generated from rellum-diagnostics/src/db.rs.
Explanation
Character literals must contain one character or escape sequence and then close with a single quote. Without the closing quote, the lexer cannot know where the char token ends.
Common causes
- forgetting the closing single quote
- placing multiple characters in a char literal
- using a char literal where a string literal was intended
Canonical fixes
- close the char literal
Before:
ch = 'x
After:
ch = 'x'
- use a string literal for text
Before:
label = 'ok'
After:
label = "ok"
Code example
ch = 'x