Skip to content

Remove hir-ty/src/next_solver/mapping.rs#20896

Merged
ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
smmalis37:delete-mapping
Oct 24, 2025
Merged

Remove hir-ty/src/next_solver/mapping.rs#20896
ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
smmalis37:delete-mapping

Conversation

@smmalis37

Copy link
Copy Markdown
Contributor

It's no longer needed, now that chalk is gone.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 23, 2025
Comment thread crates/hir-ty/src/db.rs
#[derive(PartialOrd, Ord)]
pub struct InternedOpaqueTyId {
pub loc: ImplTraitId,
pub loc: ImplTraitId<'db>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh we can use 'db here?!

I would prefer not to rely on this, as this seems to be an accidental feature. Instead, remove no_lifetime and introduce a lifetime to this struct.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I didn't expect it to work, but rustc said "use <'db> here" so i did and it worked.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

salsa::interned doesn't seem to like me adding lifetimes:
image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's merge this then, as it's an improvement over the status quo.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also adding a lifetime to InternedOpaqueTyId propagates up to SolverDefId, and farther.

@ChayimFriedman2 ChayimFriedman2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue Oct 24, 2025
Merged via the queue into rust-lang:master with commit 9061bd3 Oct 24, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 24, 2025
@smmalis37 smmalis37 deleted the delete-mapping branch October 24, 2025 00:25
@lnicola

lnicola commented Oct 24, 2025

Copy link
Copy Markdown
Member

changelog fixup #20329

mendelsshop pushed a commit to mendelsshop/rust-analyzer that referenced this pull request Oct 27, 2025
Remove hir-ty/src/next_solver/mapping.rs
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.

4 participants