Skip to content

Conversation

@MichaReiser
Copy link
Contributor

@MichaReiser MichaReiser commented Dec 19, 2025

Support deriving salsa::Update for generic types.

We have a few generic types in ty that are used within interned values, for which deriving salsa::Update currently doesn't work because the derived salsa::Update doesn't work for all Ts, only Ts that implement salsa::Update.

This PR adds a generic constraint to the salsa::Update implementation to every generic type.

@netlify
Copy link

netlify bot commented Dec 19, 2025

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit 01c92b9
🔍 Latest deploy log https://app.netlify.com/projects/salsa-rs/deploys/694512c948469a00084ae052

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 19, 2025

CodSpeed Performance Report

Merging #1041 will degrade performances by 4.01%

Comparing MichaReiser:update-trait-bounds (01c92b9) with master (e72b228)

Summary

❌ 1 regression
✅ 12 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
amortized[Input] 2.1 µs 2.2 µs -4.01%

@MichaReiser MichaReiser added this pull request to the merge queue Dec 22, 2025
Merged via the queue into salsa-rs:master with commit ce80691 Dec 22, 2025
11 of 12 checks passed
@MichaReiser MichaReiser deleted the update-trait-bounds branch December 22, 2025 11:21
@MichaReiser
Copy link
Contributor Author

We need this to update ty. Happy to address any follow up comments

Copy link
Member

@ibraheemdev ibraheemdev left a comment

Choose a reason for hiding this comment

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

Looks fine to me, sorry for the late review.

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