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

Don't lint assertions_on_constants on any const assertions #12840

Merged
merged 7 commits into from
Jul 1, 2024

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented May 24, 2024

close #12816
close #12847
cc #12817


changelog: Fix false positives in consts for assertions_on_constants and unnecessary_operation.

@rustbot
Copy link
Collaborator

rustbot commented May 24, 2024

r? @dswij

rustbot has assigned @dswij.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label May 24, 2024
clippy_lints/src/default_numeric_fallback.rs Outdated Show resolved Hide resolved
tests/ui/assertions_on_constants.stderr Outdated Show resolved Hide resolved
@tesuji tesuji changed the title Don't lint assertions-on-constants when it is const assertions Don't lint assertions-on-constants on any const assertions May 24, 2024
@tesuji
Copy link
Contributor Author

tesuji commented Jun 5, 2024

It's been 2 weeks without new review
Reassigning : r? y21

@rustbot rustbot assigned y21 and unassigned dswij Jun 5, 2024
@tesuji tesuji force-pushed the const-asserts branch 2 times, most recently from e6cb5a2 to 7b06d72 Compare June 8, 2024 09:39
@tesuji
Copy link
Contributor Author

tesuji commented Jun 8, 2024

Build fail as expected. In summary: body_const_context doesn't recognize const blocks.
See rust-lang/rust#125918 for more details

So waiting for next rustup...
@rustbot block

Edit:
Nevermind, just bless the test

- remove now dead code in ASSERTIONS_ON_CONSTANTS
  cc rust-lang#11966
- Partially revert "ignore `assertions-on-constants` in const contexts"
  This reverts commit c7074de.
@tesuji
Copy link
Contributor Author

tesuji commented Jun 19, 2024

rerolling r? @llogiq

@rustbot rustbot assigned llogiq and unassigned y21 Jun 19, 2024
@llogiq
Copy link
Contributor

llogiq commented Jun 19, 2024

Looks ok to me. Thank you for staying the course.

@bors r+

@bors
Copy link
Contributor

bors commented Jun 19, 2024

📌 Commit 0d188f0 has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jun 19, 2024

⌛ Testing commit 0d188f0 with merge 7de2cd7...

bors added a commit that referenced this pull request Jun 19, 2024
Don't lint `assertions-on-constants` on any const assertions

changelog: Don't lint `assertions-on-constants` on any const assertions
changelog: fix false-positive of `unnecessary-operation` lint in const contexts.

close #12816
close #12847
cc #12817
@bors
Copy link
Contributor

bors commented Jun 19, 2024

💔 Test failed - checks-action_test

@tesuji
Copy link
Contributor Author

tesuji commented Jun 20, 2024

Blessed the test after rustup !

@tesuji tesuji changed the title Don't lint assertions-on-constants on any const assertions Don't lint assertions_on_constants on any const assertions Jun 22, 2024
@SUPERCILEX
Copy link

Can the build be rerun? I just ran into this issue.

@tesuji
Copy link
Contributor Author

tesuji commented Jul 1, 2024

@llogiq Could we @bor retry again?

@llogiq
Copy link
Contributor

llogiq commented Jul 1, 2024

Ok, here goes nothing:

@bors retry

@llogiq
Copy link
Contributor

llogiq commented Jul 1, 2024

Ah, that won't work. I need to

@bors r+

again

@bors
Copy link
Contributor

bors commented Jul 1, 2024

📌 Commit a0234b4 has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jul 1, 2024

⌛ Testing commit a0234b4 with merge c412528...

@bors
Copy link
Contributor

bors commented Jul 1, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing c412528 to master...

@bors bors merged commit c412528 into rust-lang:master Jul 1, 2024
8 checks passed
@tesuji tesuji deleted the const-asserts branch July 2, 2024 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
7 participants