Get the latest tech news
Rust's Most Subtle Syntax
'What?' - Richard Nixon
“expr equals 4” isn’t an irrefutable match, and you aren’t handling the case where it doesn’t. Realistically, the only reason this can be confusing is that you’re allowed to write let UPPERCASE, and const lowercase. If creating a variable that started with a capital letter was a lint error, no confusion could happen; you could never accidentally bind something when trying to match an enum variant or constant.
Or read this on Hacker News