Type ascription misdiagnosis when trying to use serde_json::json! #73777
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Hi @estebank I didn't forget about your encouragement on Twitter: https://twitter.com/ekuber/status/1255881826855313409?s=20
I forgot a comma at the end of the first key-value pair:
On the latest nightly compiler this is explicitly diagnosed as an attempt to use type ascription:
On stable, it's arguably much worse, the error only makes sense if you know the compiler thinks this is type ascription but feature is not mentioned:
The text was updated successfully, but these errors were encountered: