Skip to content

Add a fake DefId for promoted constants #1420

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

Merged
merged 7 commits into from
Apr 29, 2025

Conversation

Nadrieril
Copy link
Collaborator

Promoted constants have their own ad-hoc identifier scheme which is a (DefId, u32) pair. They would have a normal DefId if not for performance reasons (rust-lang/rust#111693). To simplify Charon's life, this makes hax give a DefId to promoted constants, along with a FullDef when requested.

Copy link
Collaborator

@W95Psp W95Psp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@Nadrieril Nadrieril added this pull request to the merge queue Apr 29, 2025
Merged via the queue into cryspen:main with commit 0275a2b Apr 29, 2025
15 of 16 checks passed
@Nadrieril Nadrieril deleted the promoted-defid branch April 29, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants