Skip to content

fix: Apply cast expr coercion adjustments #16870

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

Closed

Conversation

ShoyuVanilla
Copy link
Member

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
Member Author

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

@bors
Copy link
Contributor

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
@Veykril
Copy link
Member

Veykril commented Jun 4, 2024

Closing due to inactivity, feel free to re-open this should you get back to it

@Veykril Veykril closed this Jun 4, 2024
@ShoyuVanilla
Copy link
Member Author

I've been quite busy for my wedding 😅 Maybe I'm gonna continue working on this in July

@Veykril
Copy link
Member

Veykril commented Jun 5, 2024

No worries and congrats :)

@ShoyuVanilla ShoyuVanilla deleted the apply-cast-adjusts branch September 11, 2024 02:00
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