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

Fix debug_assert in unused lint pass #94353

Merged
merged 1 commit into from
Feb 25, 2022

Conversation

flip1995
Copy link
Member

This fixes a debug assertion in the unused lint pass. As a side effect, this also improves the span generated for tuples in the unused_must_use lint.

found in #94329

A reproducer for this would be

fn main() { (1, (3,)); }

Not sure, if I should add a regression test for a debug_assert.

This fixes a debug assertion in the unused lint pass. As a side effect,
this also improves the span generated for tuples in the
`unused_must_use` lint.
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 25, 2022
@rust-highfive
Copy link
Collaborator

r? @davidtwco

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 25, 2022
@Dylan-DPC
Copy link
Member

r? @Dylan-DPC

@rust-highfive rust-highfive assigned Dylan-DPC and unassigned davidtwco Feb 25, 2022
@Dylan-DPC
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 25, 2022

📌 Commit bbe3447 has been approved by Dylan-DPC

@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 Feb 25, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 25, 2022
…=Dylan-DPC

Fix debug_assert in unused lint pass

This fixes a debug assertion in the unused lint pass. As a side effect, this also improves the span generated for tuples in the `unused_must_use` lint.

found in rust-lang#94329

A reproducer for this would be

```rust
fn main() { (1, (3,)); }
```

Not sure, if I should add a regression test for a `debug_assert`.
This was referenced Feb 25, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 25, 2022
…askrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#93850 (Don't ICE when an extern static is too big for the current architecture)
 - rust-lang#94154 (Wire up unstable rustc --check-cfg to rustdoc)
 - rust-lang#94353 (Fix debug_assert in unused lint pass)
 - rust-lang#94366 (Add missing item to release notes)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 070d7c2 into rust-lang:master Feb 25, 2022
@rustbot rustbot added this to the 1.61.0 milestone Feb 25, 2022
@flip1995 flip1995 deleted the fix_debug_assert_unused branch February 26, 2022 12:16
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.

None yet

6 participants