Closed
Description
Proposal:
We should have a lint mode that warns when the result of some expression is not used (unless that result is of type unit or bot). Furthermore, this lint more should be set to error by default (or perhaps warning, if people insist, but I generally feel like warnings should be errors by default, 'cause I'm strict like that).
Implications:
Unless the lint mode is disabled, you would have to ignore results explicitly, like this:
let _ = some_function_whose_return_value_I_do_not_want_to_use();
This subsumes #2965. @catamorphism had proposed that we discuss this idea in the other issue, but I chose to make a separate issue for this because I think the title of the other is insufficient, and I wanted the issue to get re-emailed to everyone for discussion.