Skip to content

bool_to_int_with_if: properly handle macros #14629

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

Merged

Conversation

samueltardieu
Copy link
Contributor

@samueltardieu samueltardieu commented Apr 16, 2025

  • Do not replace macro results in then/else branches
  • Extract condition snippet from the right context
  • Make suggestion MaybeIncorrect if it would lead to losing comments

changelog: [bool_to_int_with_if]: properly handle macros

Fixes #14628

- Do not replace macro results in then/else branches
- Extract condition snippet from the right context
- Make suggestion `MaybeIncorrect` if it would lead to losing comments
@rustbot
Copy link
Collaborator

rustbot commented Apr 16, 2025

r? @Manishearth

rustbot has assigned @Manishearth.
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 Apr 16, 2025
@Manishearth Manishearth added this pull request to the merge queue Apr 17, 2025
Merged via the queue into rust-lang:master with commit 949b3bc Apr 17, 2025
11 of 13 checks passed
@samueltardieu samueltardieu deleted the bool-to-int-with-if-macros branch April 17, 2025 06:41
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.

Incorrect macro handling in bool_to_int_with_if
3 participants