Skip to content

Conversation

@ada4a
Copy link
Contributor

@ada4a ada4a commented Oct 26, 2025

changelog: [unnecessary_mut_passed]: support &raw references

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 26, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 26, 2025

r? @Jarcho

rustbot has assigned @Jarcho.
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

@ada4a ada4a force-pushed the unnecessary_mut_passed branch 2 times, most recently from f48a9c0 to 308a4d5 Compare October 26, 2025 17:32
@ada4a ada4a force-pushed the unnecessary_mut_passed branch from 308a4d5 to 2eb959e Compare November 7, 2025 16:33
@rustbot
Copy link
Collaborator

rustbot commented Nov 7, 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.

@Jarcho
Copy link
Contributor

Jarcho commented Nov 7, 2025

The provenance of raw pointers is preserved through casts and coercions. This means that &raw mut e coerced to *const T is not actually equivalent to &raw const e and can result in some very subtly incorrect, but still compilable, code. Because of that I'm against linting this, especially as the same lint.

@ada4a
Copy link
Contributor Author

ada4a commented Nov 7, 2025

Oh, sure, no problem. It's just that there were already test cases with comments about the intention to eventually lint &raw mut, and so I went ahead and implemented that. But if you're saying that linting that is actually undesirable, then I'll just remove those test cases instead

@ada4a ada4a closed this Nov 7, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Nov 7, 2025
@ada4a ada4a deleted the unnecessary_mut_passed branch November 7, 2025 20:08
github-merge-queue bot pushed a commit that referenced this pull request Nov 8, 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