Skip to content

Turn BlockId into a #[salsa::tracked] #19995

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 1 commit into from
Jun 13, 2025

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Jun 13, 2025

We do not need interned equality based identity here

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 13, 2025
@Veykril Veykril force-pushed the push-zpyyzqqpywno branch from 0e1ef92 to 8643a85 Compare June 13, 2025 15:30
@Veykril Veykril enabled auto-merge June 13, 2025 15:41
@Veykril Veykril added this pull request to the merge queue Jun 13, 2025
Merged via the queue into rust-lang:master with commit de34303 Jun 13, 2025
14 checks passed
@Veykril Veykril deleted the push-zpyyzqqpywno branch June 13, 2025 15:53
type Database = dyn DefDatabase;
type ID = BlockId;
fn intern(self, db: &Self::Database) -> Self::ID {
unsafe { std::mem::transmute::<BlockIdLt<'_>, BlockId>(BlockIdLt::new(db, self)) }
Copy link
Contributor

Choose a reason for hiding this comment

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

I... don't like this thing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, that's how all the interned work right now. This just does the same for tracked structs since they dont have support for it. Ideally we'd have the lifetime everywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants