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

Quick and dirty fix of the unused_braces lint #71517

Merged
merged 2 commits into from
Apr 25, 2020

Conversation

flip1995
Copy link
Member

cc @lcnr

Adresses #70814

This at least prevents lint output, if no span is available. Even though this also prevents the unused_parens lint from emitting, when the DUMMY_SP is used there, but I think that should be ok, since error messages without a span are quite useless anyway.

Clippy CI is currently blocked on this bug. If this quick and dirty fix should be rejected, I could try to work around this in Clippy.

r? @shepmaster

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 24, 2020
src/librustc_lint/unused.rs Outdated Show resolved Hide resolved
@lcnr
Copy link
Contributor

lcnr commented Apr 24, 2020

Sounds good! I considered doing the same in the next few days as I was unable to fix the underlying problem.

We may want to backport this to beta IMO.

@flip1995
Copy link
Member Author

@rust-lang/compiler Maybe a candidate for a beta backport. This crashed a few CIs including Clippy's

@oli-obk
Copy link
Contributor

oli-obk commented Apr 25, 2020

@bors r+ p=1

this is blocking tools and very annoying to users. Merging this so we have time to come up with a nice fix.

@bors
Copy link
Contributor

bors commented Apr 25, 2020

📌 Commit 485f199 has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 25, 2020
@oli-obk oli-obk added beta-nominated Nominated for backporting to the compiler in the beta channel. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 25, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 25, 2020
Rollup of 5 pull requests

Successful merges:

 - rust-lang#71364 (Ignore -Zprofile when building compiler_builtins)
 - rust-lang#71494 (Fix span of while (let) expressions after lowering)
 - rust-lang#71517 ( Quick and dirty fix of the unused_braces lint)
 - rust-lang#71523 (Take a single root node in range_search)
 - rust-lang#71533 (Revert PR 70566 for const validation fix)

Failed merges:

r? @ghost
@bors bors merged commit 4762e22 into rust-lang:master Apr 25, 2020
@flip1995 flip1995 deleted the unused_braces_hack branch April 25, 2020 17:01
@spastorino spastorino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 29, 2020
@pnkfelix
Copy link
Member

discussed in T-compiler meeting. beta backport approved.

@pnkfelix pnkfelix added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Apr 30, 2020
@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label May 9, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request May 11, 2020
…ulacrum

[beta] backports

This backport rollup includes the following:
 * [beta] Update cargo rust-lang#71967
 * Backport 1.43.1 release notes to master rust-lang#71914
 * Update the `cc` crate rust-lang#71882
 * resolve: Relax fresh binding disambiguation slightly to fix regression rust-lang#71846
 * Do not try to find binop method on RHS `TyErr` rust-lang#71810
 * Quick and dirty fix of the unused_braces lint rust-lang#71517
 * Update stdarch submodule rust-lang#71495
 * normalize field projection ty to fix broken MIR issue rust-lang#71488
 * Update openssl-src to 1.1.1g rust-lang#71430
 * fix error code in E0751.md rust-lang#71426
 * Don't fuse Chain in its second iterator rust-lang#71404
 * Remove some `Vec` allocations to improve performance rust-lang#71268
 * [CI] Use the latest Python available on Windows rust-lang#71995

It also switches the bootstrap compiler to 1.43.1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.

9 participants