rust/compiler/rustc_typeck
Esteban Küber d669882f38 Do not suggest ; if expression is side effect free
When a tail expression isn't unit, we previously always suggested adding
a trailing `;` to turn it into a statement. This suggestion isn't
appropriate for any expression that doesn't have side-effects, as the
user will have likely wanted to call something else or do something with
the resulting value, instead of just discarding it.
2021-02-21 16:34:37 -08:00
..
2021-02-14 18:03:11 +03:00

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.