docs: refine pointer conversion guidance - #1227
Open
PLeVasseur wants to merge 4 commits into
Open
PLeVasseur wants to merge 4 commits into
PLeVasseur wants to merge 4 commits into
Conversation
✅ Deploy Preview for scrc-coding-guidelines ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
PLeVasseur
force-pushed
the
docs/fls-provenance-guideline-updates
branch
from
July 29, 2026 11:41
2902213 to
fce2e96
Compare
PLeVasseur
force-pushed
the
docs/fls-provenance-guideline-updates
branch
from
July 29, 2026 11:55
fce2e96 to
9513fb3
Compare
inkreasing
reviewed
Jul 29, 2026
There was a problem hiding this comment.
Did you look at my PR #426?
I tried to fix some stuff in there, might be useful.
Collaborator
Author
There was a problem hiding this comment.
I did not look yet; I should!
Thank you for the link.
inkreasing
reviewed
Jul 29, 2026
|
|
||
| #[allow(dead_code)] | ||
| fn f1(flag: u32, ptr: * const u32) { | ||
| fn f1(flag: usize, ptr: * const u32) { |
There was a problem hiding this comment.
Do you want to mention https://doc.rust-lang.org/std/primitive.pointer.html#method.map_addr-1 as a possible alternative?
plaindocs
reviewed
Aug 11, 2026
| **Exception:** ``as`` may be used with ``usize`` as the right operand and an expression of raw pointer | ||
| type as the left operand. | ||
|
|
||
| An ``as`` cast from a numeric value to a raw pointer type is outside the scope of this guideline; it is |
Collaborator
There was a problem hiding this comment.
It leaves an interesting theoretical situation situation where you don't use A numeric value shall not be converted to a pointer but do use this guideline.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
transmuteFollow-up to #1225; the FLS lock update landed in #1228.
Checks
./make.py