Mutable closure captures through opaque casts - #160150
Open
amirHdev wants to merge 1 commit into
Open
Conversation
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
amirHdev
force-pushed
the
fix-opaque-place
branch
from
July 29, 2026 13:38
a35616e to
89bb76d
Compare
amirHdev
marked this pull request as ready for review
July 30, 2026 13:18
Collaborator
|
Some changes occurred in cc @BoxyUwU Some changes occurred in match checking cc @Nadrieril |
Collaborator
|
r? @khyperia rustbot has assigned @khyperia. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Contributor
|
Would you mind describing a bit why a new THIR ExprKind is needed? This seems like it's a bug with the old solver, the new solver is able to error on this without requiring a new THIR node kind. How is it able to do so? Why is a new node kind needed for the old solver? If there's a good reason, do we want to only create this node kind if the old solver is in use? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #160120
Preserve place semantics for opaque projections in closure captures instead of lowering them through
ExprKind::Useand ensures mutable captures through TAIT opaque casts are validated by borrowck with both solvers