-
Notifications
You must be signed in to change notification settings - Fork 1.9k
transmuting_null: Add checks for without_provenance and without_provenance_mut
#16336
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
Open
Coca162
wants to merge
1
commit into
rust-lang:master
Choose a base branch
from
Coca162:transmute-without-provenance-null
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
transmuting_null: Add checks for without_provenance and without_provenance_mut
#16336
Coca162
wants to merge
1
commit into
rust-lang:master
from
Coca162:transmute-without-provenance-null
+36
−1
Conversation
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
Coca162
added a commit
to Coca162/rust
that referenced
this pull request
Jan 2, 2026
…_mut` Added for enhancing clippy lint `transmuting_null` rust-lang/rust-clippy#16336
Coca162
added a commit
to Coca162/rust
that referenced
this pull request
Jan 2, 2026
…_mut` Adds diagnostic items for `core::ptr::without_provenance` and `core::ptr::without_provenance_mut`. Will be used to enhance clippy lint `transmuting_null`, see rust-lang/rust-clippy#16336.
Coca162
added a commit
to Coca162/rust
that referenced
this pull request
Jan 2, 2026
…_mut` Adds diagnostic items for `core::ptr::without_provenance` and `core::ptr::without_provenance_mut`. Will be used to enhance clippy lint `transmuting_null`, see rust-lang/rust-clippy#16336.
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jan 3, 2026
…tics, r=Urgau Add diagnostic items for `without_provenance` and `without_provenance_mut` Adds diagnostic items for `core::ptr::without_provenance` and `core::ptr::without_provenance_mut`. Will be used to enhance clippy lint `transmuting_null`, see rust-lang/rust-clippy#16336.
rust-timer
added a commit
to rust-lang/rust
that referenced
this pull request
Jan 3, 2026
Rollup merge of #150627 - Coca162:without_provenance_diagnostics, r=Urgau Add diagnostic items for `without_provenance` and `without_provenance_mut` Adds diagnostic items for `core::ptr::without_provenance` and `core::ptr::without_provenance_mut`. Will be used to enhance clippy lint `transmuting_null`, see rust-lang/rust-clippy#16336.
Contributor
Author
|
Waiting for nightly version update |
…provenance_mut` Currently `without_provenance`/`without_provenance_mut` do not have a `rustc_diagnostic_item` so this change is dependent on them being added before being ready to be used. changelog: [`transmuting_null`]: now checks for [`ptr::without_provenance`](https://doc.rust-lang.org/core/ptr/fn.without_provenance.html) and [`ptr::without_provenance_mut`](https://doc.rust-lang.org/core/ptr/fn.without_provenance_mut.html) which create null pointers
9310852 to
7d0b1e1
Compare
Collaborator
|
rustbot has assigned @samueltardieu. Use |
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.
Currentlywithout_provenance/without_provenance_mutdo not have arustc_diagnostic_itemso this change is dependent on them being added before being ready to be used.changelog: [
transmuting_null]: now checks forptr::without_provenanceandptr::without_provenance_mutwhich create null pointers