E0004: Unterminated string
| Code | Category | Stability |
|---|---|---|
E0004 | Lexer | Permanent |
Explanation
A string literal reached the end of its line or the end of the source file without a closing double quote.
Likely cause
The closing " is missing, or a physical newline was placed inside the literal instead of being written with the \n escape.
Examples
Missing closing quote
fn main() {
let text = "unfinished
}
Close the string on the same line
fn main() {
let text = "finished";
}