Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Apply cast expr coercion adjustments #16870

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ShoyuVanilla
Copy link
Contributor

Surprisingly, this fixes #16564; the cause of it is that

if is_ref {
self.unify_and(&from_raw, to_ty, |target| {
vec![
Adjustment { kind: Adjust::Deref(None), target: from_inner.clone() },
Adjustment { kind: Adjust::Borrow(AutoBorrow::RawPtr(to_mt)), target },
]
})

those adjustment aren't applied.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 18, 2024
@ShoyuVanilla ShoyuVanilla marked this pull request as draft March 18, 2024 12:28
@ShoyuVanilla
Copy link
Contributor Author

As this breaks some tests inside mir::eval, I'm studying mir lowering 😅

@bors
Copy link
Collaborator

bors commented Apr 6, 2024

☔ The latest upstream changes (presumably #17023) made this pull request unmergeable. Please resolve the merge conflicts.

@Veykril Veykril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect "cannot move &mut () out of reference" error
4 participants