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

Wrap getting a &mut from a static mut in an unsafe block #558

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

jannic
Copy link
Member

@jannic jannic commented Sep 16, 2024

Fixes #537

@jannic jannic requested a review from a team as a code owner September 16, 2024 21:18
@jannic jannic force-pushed the issue-537 branch 2 times, most recently from 09d6fa7 to 616391e Compare September 17, 2024 08:17
@ia0
Copy link

ia0 commented Oct 29, 2024

Note that we'll probably still get the static-mut-refs lint right? (i.e. this only fixes the unsafe-op-in-unsafe-fn lint)

Not sure what's the best: just allow the lint or try to use &raw mut (but that might trigger other lints deref-addrof).

@jannic
Copy link
Member Author

jannic commented Oct 29, 2024

Note that we'll probably still get the static-mut-refs lint right? (i.e. this only fixes the unsafe-op-in-unsafe-fn lint)

Not sure what's the best: just allow the lint or try to use &raw mut (but that might trigger other lints deref-addrof).

That's already taken care of by #561

@ia0
Copy link

ia0 commented Oct 30, 2024

That's already taken care of by #561

Perfect! I didn't see it since it's not released yet and got the warning with a recent compiler.

@adamgreig adamgreig added this pull request to the merge queue Nov 3, 2024
Merged via the queue into rust-embedded:master with commit e41d989 Nov 3, 2024
11 checks passed
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.

static mut transform produces warning with unsafe-op-in-unsafe-fn
3 participants