[strict provenance] make compiler's Term
and GenericArg
conform #119217
Closed
Description
Term
and GenericArg
currently store pointers as NonZeroUsize
, which is not ideal:
rust/compiler/rustc_middle/src/ty/mod.rs
Line 846 in 92ad4b4
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).
Metadata
Assignees
Labels
Area: Strict provenance for raw pointersCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.