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 the return value of the type_id intrinsic in an opaque box #10594

Closed
alexcrichton opened this issue Nov 21, 2013 · 2 comments · Fixed by #10722
Closed

Wrap the return value of the type_id intrinsic in an opaque box #10594

alexcrichton opened this issue Nov 21, 2013 · 2 comments · Fixed by #10722
Labels
P-medium Medium priority
Milestone

Comments

@alexcrichton
Copy link
Member

Right now the return value is a raw u64, but we may want to change the representation over time (ala #10389).

We should wrap the return value in a struct TypeId { priv ... } and define the Eq trait on this structure.

Fairly easy bug, but requires probably adding a lang item and mucking around with some intrinsics, so not flagging as E-easy.

@pnkfelix
Copy link
Member

Accepted for P-high.

@Kimundi
Copy link
Member

Kimundi commented Nov 21, 2013

Note that any.rs defines just such a type, it would just need to be used by the type_id intrinsic

flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 7, 2023
fix [`mem_replace_option_with_none`] not considering field variables

fixes: rust-lang#9824

---

changelog: fix [`mem_replace_option_with_none`] not considering field variables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-medium Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants