mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-15 16:58:02 +00:00

Don't suggest adding `let` in certain `if` conditions Avoid being too eager to suggest `let` in an `if` condition with an `=`, namely when the LHS of the `=` isn't even valid as a pattern (to a first degree approximation). This heustic I came up with kinda sucks. Let me know if it needs to be refined.
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.