Skip to content

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Jul 17, 2024

changelog: [const_is_empty] Don't trigger lint inside const blocks
Fixes #13106 .

@rustbot
Copy link
Collaborator

rustbot commented Jul 17, 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 Jul 17, 2024
@dswij
Copy link
Member

dswij commented Aug 3, 2024

This does mean that we're going to ignore all const blocks, e.g. this is going to be ignored too.

const {
   "".is_empty();
}

Is there an alternative we can do?

I think we can also check for assert!. This FP seems to be for compile-time assertions.

@tesuji
Copy link
Contributor Author

tesuji commented Aug 7, 2024

You have a good point.
Unfortunately I don't have enough motivation for fixing clippy right now.
Closing for now.
Thanks for your thoughful review!

@tesuji tesuji closed this Aug 7, 2024
@tesuji tesuji deleted the fix_const_is_empty branch August 7, 2024 03:50
@dswij
Copy link
Member

dswij commented Aug 7, 2024

Thanks for taking the time to open this PR!

bors added a commit that referenced this pull request Oct 20, 2024
Don't trigger `const_is_empty` for inline const assertions

Close #13106

Considered case was described [here](#13114 (comment))

changelog [`const_is_empty`]: skip const_is_empty for inline const assertions
bors added a commit that referenced this pull request Oct 22, 2024
Don't trigger `const_is_empty` for inline const assertions

Close #13106

Considered case was described [here](#13114 (comment))

changelog [`const_is_empty`]: skip const_is_empty for inline const assertions
bors added a commit that referenced this pull request Oct 24, 2024
Don't trigger `const_is_empty` for inline const assertions

Close #13106

Considered case was described [here](#13114 (comment))

changelog: [`const_is_empty`]: skip const_is_empty for inline const assertions
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
Development

Successfully merging this pull request may close these issues.

const_is_empty emits for inline const assertions
3 participants