Skip to content

Make CovariantUnsafeCell actually covariant - #163051

Open
asquared31415 wants to merge 1 commit into
rust-lang:mainfrom
asquared31415:actually_covariant_unsafe_cell
Open

asquared31415 wants to merge 1 commit into
rust-lang:mainfrom
asquared31415:actually_covariant_unsafe_cell

Conversation

@asquared31415

@asquared31415 asquared31415 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

The "test" in core was not actually being run, due to core being weird. (filed #163045 to track that)

The existing mechanism for inserting variance manually was only priming the solver, which happened to work for the other two types using this mechanism, but does not work for weakening variance explicitly. I changed this mechanism to additionally prevent the variance from being updated when solving.

This blocks #159838

r? @WaffleLapkin as the implementor of CovariantUnsafeCell

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 20, 2026
@rustbot

rustbot commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

WaffleLapkin is not on the review rotation at the moment.
They may take a while to respond.

@steffahn

Copy link
Copy Markdown
Member

Maybe it's easier (and faster) to throw out the overridden constraints once, instead of checking whether to skip them on every iteration?

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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants