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

internal: support const on UnsafeCell #374

Closed
wants to merge 1 commit into from

Conversation

davidbarsky
Copy link
Member

This method was const since 1.32 (https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.new) and some code in Salsa makes use of creating UnsafeCells in const contexts.

(Salsa is heavily used used by rust-analyzer and I'm spending a bit of time to make sure rust-analyzer's dependencies are reliable.)

@davidbarsky
Copy link
Member Author

I'll close this PR because I didn't realize it wasn't possible to const-ify some code here due to Loom's tracking code not being usable in const contexts.

@davidbarsky davidbarsky deleted the davidbarsky/support-const-unsafe-cell branch January 31, 2025 20:38
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.

1 participant