Skip to content

Conversation

ada4a
Copy link
Contributor

@ada4a ada4a commented Aug 13, 2025

This lint consists of two distinct cases: one for the as cast, and one for .cast(). Splitting them in two separate functions allowed moving the as one into the if let ExprKind::Cast branch of casts/mod.rs, and reusing the variables created there

changelog: none

@rustbot
Copy link
Collaborator

rustbot commented Aug 13, 2025

r? @llogiq

rustbot has assigned @llogiq.
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 Aug 13, 2025
@ada4a ada4a force-pushed the split-cast-ptr-alignment branch from 1f16e32 to a7516cd Compare August 13, 2025 17:34
@ada4a ada4a force-pushed the split-cast-ptr-alignment branch from a7516cd to edcb084 Compare August 22, 2025 13:35
@rustbot

This comment has been minimized.

ada4a added 3 commits August 24, 2025 08:23
this allows reusing `cast_from` and `cast_to`

one possible problem is that the `if` has an additional
`is_hir_ty_cfg_dependant` check which the let-chain of the  original
`check` didn't have.. but maybe this is actually more correct
@ada4a ada4a force-pushed the split-cast-ptr-alignment branch from edcb084 to 74be6f7 Compare August 24, 2025 06:26
@rustbot
Copy link
Collaborator

rustbot commented Aug 24, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@llogiq
Copy link
Contributor

llogiq commented Aug 24, 2025

Thank you!

@llogiq llogiq added this pull request to the merge queue Aug 24, 2025
Merged via the queue into rust-lang:master with commit 75d01b7 Aug 24, 2025
11 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 24, 2025
@ada4a ada4a deleted the split-cast-ptr-alignment branch August 24, 2025 14:16
@rustbot rustbot mentioned this pull request Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants