Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ty] Construct trivial constraint sets directly#25659

Merged
charliermarsh merged 1 commit into
mainfrom
charlie/construct-trivial-constraint-set
Jun 5, 2026
Merged

[ty] Construct trivial constraint sets directly#25659
charliermarsh merged 1 commit into
mainfrom
charlie/construct-trivial-constraint-set

Conversation

@charliermarsh

Copy link
Copy Markdown
Member

Summary

OwnedConstraintSet::always() currently uses a OnceLock to retain a value that only contains the ALWAYS_TRUE node and empty arenas.

This constructs the value directly. when_constraint_set_assignable_to_owned now returns a Cow, so trivial relations can return the owned value while nontrivial relations continue to borrow the Salsa-cached result.

Follow-up to #25656 (comment).

@astral-sh-bot astral-sh-bot Bot added the ty Multi-file analysis & type inference label Jun 5, 2026
@astral-sh-bot

astral-sh-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 92.13%. The percentage of expected errors that received a diagnostic held steady at 87.18%. The number of fully passing files held steady at 92/134.

@astral-sh-bot

astral-sh-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot

astral-sh-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.

Full report with detailed diff (timing results)

@charliermarsh charliermarsh marked this pull request as ready for review June 5, 2026 14:04
@charliermarsh charliermarsh added the performance Potential performance improvement label Jun 5, 2026

@dcreager dcreager left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@charliermarsh charliermarsh merged commit e89b2b1 into main Jun 5, 2026
59 checks passed
@charliermarsh charliermarsh deleted the charlie/construct-trivial-constraint-set branch June 5, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Potential performance improvement ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants