Skip to content
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

Conversation

zackmdavis
Copy link
Member

Resolves #44119.

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.
@rust-highfive
Copy link
Collaborator

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@eddyb
Copy link
Member

eddyb commented Aug 28, 2017

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 28, 2017

📌 Commit cc5ea04 has been approved by eddyb

@arielb1 arielb1 added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 28, 2017
@arielb1
Copy link
Contributor

arielb1 commented Aug 28, 2017

1.21 is now beta, so this needs to be applied there.

@arielb1 arielb1 added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 28, 2017
@carols10cents carols10cents added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 28, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Aug 29, 2017
…_results, r=eddyb

un-regress behavior of `unused_results` lint for booleans

Resolves rust-lang#44119.
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Aug 29, 2017
…_results, r=eddyb

un-regress behavior of `unused_results` lint for booleans

Resolves rust-lang#44119.
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Aug 29, 2017
…_results, r=eddyb

un-regress behavior of `unused_results` lint for booleans

Resolves rust-lang#44119.
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Aug 29, 2017
…_results, r=eddyb

un-regress behavior of `unused_results` lint for booleans

Resolves rust-lang#44119.
arielb1 pushed a commit to arielb1/rust that referenced this pull request Aug 29, 2017
…_results, r=eddyb

un-regress behavior of `unused_results` lint for booleans

Resolves rust-lang#44119.
@zackmdavis
Copy link
Member Author

@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 zackmdavis closed this Aug 29, 2017
@bors
Copy link
Contributor

bors commented Aug 29, 2017

@zackmdavis: 🔑 Insufficient privileges: Not in reviewers

1 similar comment
@bors
Copy link
Contributor

bors commented Aug 29, 2017

@zackmdavis: 🔑 Insufficient privileges: Not in reviewers

@zackmdavis
Copy link
Member Author

@bors we heard you the first time; you don't have to rub it in

@arielb1
Copy link
Contributor

arielb1 commented Aug 29, 2017

@bors r-

@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 1, 2017
@alexcrichton
Copy link
Member

Removing the beta-nominated tag as this was closed

@alexcrichton alexcrichton reopened this Sep 1, 2017
@alexcrichton
Copy link
Member

er sorry didn't mean to reopen

@zackmdavis zackmdavis deleted the booleans_were_not_unused_results branch January 13, 2018 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants