Nasty bug in Rust safety: https://github.com/rust-lang/rust/issues/35112 -- currently only a compile warning, rather than a hard error.
Related Posts
Do you have a favourite way of highlighting text in a CLI error message? Currently I'm using backticks, but I'm wondering what's the most readable.
Doing another iteration on my diagnostics display. I'm reasonably happy with the bold highlighting within the error message.
I'm not sure about the colour on Warning and Error though. It gives the output some visual structure, but arguably the message itself is more important.
Counter-intuitively, if you're writing a parser for a programming language, you need it to be a total function. As soon as you build IDE tooling, you need ASTs from invalid or incomplete input.
The parser should return (Ast, List<Error>) rather than Result<Ast, Error>.