-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
A-strict-provenanceArea: Strict provenance for raw pointersArea: Strict provenance for raw pointersE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Term
and GenericArg
currently store pointers as NonZeroUsize
, which is not ideal:
ptr: NonZeroUsize, |
rust/compiler/rustc_middle/src/ty/mod.rs
Line 846 in 92ad4b4
ptr: NonZeroUsize, |
They should really work with NonNull
pointers and strict provenance APIs like .map_addr
, .mask
, etc.
See a PR fixing a similar issue for some context: #110243 (note: in that one I ended up rewriting the whole thing, I think this issue requires far less changes).
Noratrieb
Metadata
Metadata
Assignees
Labels
A-strict-provenanceArea: Strict provenance for raw pointersArea: Strict provenance for raw pointersE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
WaffleLapkin commentedon Dec 22, 2023
(I do plan to work on this, but if you want to work on this instead — feel free to
@rustbot claim
, I can mentor you)cc @RalfJung
kamalesh0406 commentedon Dec 22, 2023
Rajveer100 commentedon Dec 26, 2023
Rajveer100 commentedon Dec 26, 2023
fee1-dead commentedon Dec 26, 2023
Rajveer100 commentedon Dec 26, 2023
Noratrieb commentedon Dec 26, 2023
5 remaining items
fee1-dead commentedon Jan 6, 2024
Hi @kamalesh0406: Just checking in :) Are you still working on this issue?
kamalesh0406 commentedon Jan 6, 2024
Yup I am still working on this issue :)
fee1-dead commentedon Jan 7, 2024
Let us know on Zulip if you need any help
Rollup merge of rust-lang#119955 - kamalesh0406:master, r=WaffleLapkin
Rollup merge of rust-lang#119955 - kamalesh0406:master, r=WaffleLapkin
Rollup merge of rust-lang#119955 - kamalesh0406:master, r=WaffleLapkin
Auto merge of rust-lang#119955 - kamalesh0406:master, r=WaffleLapkin
WaffleLapkin commentedon Jan 25, 2024
@RalfJung with this resolved, I think rustc is free from "fuzzy provenance casts" :)
RalfJung commentedon Jan 25, 2024
Awesome :-)
Auto merge of #119955 - kamalesh0406:master, r=WaffleLapkin
Auto merge of #119955 - kamalesh0406:master, r=WaffleLapkin
Auto merge of #119955 - kamalesh0406:master, r=WaffleLapkin