error syntax
What it means#
The token stream does not match the grammar of Appendix A. The message states which token was found and what was expected. Remember the statement-termination rules of §1.2: a newline ends a statement unless the line ends with a binary operator or comma, or the next line starts with a continuation token such as . or |>.
Example#
fn main() {
let = 5 // <- syntax (expected a name after `let`)
}error
syntax
How to fix#
fn main() {
let x = 5
}Fix the construct at the reported position; check brackets and the line-continuation rules of §1.2 if the error appears one line later than expected.