-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
un-regress behavior of unused_results
lint for booleans
#44122
un-regress behavior of unused_results
lint for booleans
#44122
Conversation
This, as rust-lang#43813, is due to the author of rust-lang#43728 (specifically, 3645b06) being a damnably contemptible fool. Before this entire fiasco, we would return early from the unusedness late lints pass if the type of the expression within the `hir::StmtSemi` was `!`, `()`, or a boolean: these types would never get to the point of being marked as unused results. That is, until the dunce who somehow (!?) came to be trusted with the plum responsibility of implementing RFC 1940 (`#[must_use]` for functions) went and fouled everything up, removing the early returns based on the (stupid) thought that there would be no harm in it, since we would need to continue to check these types being returned from must_use functions (which was true for the booleans, at least). But there was harm—harm that any quarter-way-competent programmer would have surely forseen! For after the new functional-must-use checks, there was nothing to stop the previously-returned-early types from falling through to be marked by the unused-results lint!—a monumentally idiotic error that has cost the project tens of precious developer- and reviewer-minutes dealing with the fallout here and in rust-lang#43813. If 3645b06 is representative of the standard of craftsmanship the rising generation of software engineers holds themselves to, I weep for the future of our technological civilization. Resolves rust-lang#44119.
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ rollup |
📌 Commit cc5ea04 has been approved by |
1.21 is now beta, so this needs to be applied there. |
…_results, r=eddyb un-regress behavior of `unused_results` lint for booleans Resolves rust-lang#44119.
…_results, r=eddyb un-regress behavior of `unused_results` lint for booleans Resolves rust-lang#44119.
…_results, r=eddyb un-regress behavior of `unused_results` lint for booleans Resolves rust-lang#44119.
…_results, r=eddyb un-regress behavior of `unused_results` lint for booleans Resolves rust-lang#44119.
…_results, r=eddyb un-regress behavior of `unused_results` lint for booleans Resolves rust-lang#44119.
@bors r- (if I can do that; it would make sense for the author to have r- privs) The discussion on #44119 is leaning towards not doing this (three team members and one other contributor against, no one in favor yet). (The rollup #44164 is already in progress; if it passes, this will have been too late and I can make a revert PR afterwards. I'm imagining that the close/r-minus-attempt here won't itself disrupt the rollup.) |
@zackmdavis: 🔑 Insufficient privileges: Not in reviewers |
1 similar comment
@zackmdavis: 🔑 Insufficient privileges: Not in reviewers |
@bors we heard you the first time; you don't have to rub it in |
@bors r- |
Removing the beta-nominated tag as this was closed |
er sorry didn't mean to reopen |
Resolves #44119.