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 autoborrowing when coercing to a mutable raw pointer #86647

Closed
wants to merge 1 commit into from

Conversation

FabianWolff
Copy link
Contributor

This PR fixes #86262. Essentially, the problem is that apply_adjustments() in FnCtxt currently only takes mutability of references into account for automatic borrows, while it should also consider mutable raw pointers. I have fixed this, so that the example in #86262 compiles with my changes.

@rust-highfive
Copy link
Collaborator

r? @jackh726

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 26, 2021
@jackh726
Copy link
Member

Not too familiar with this code. And seems pretty important in terms of soundness. So I don't feel comfortable reviewing this myself. Trying to pick someone randomly, but avoiding people that aren't around atm; let's r? @Aaron1011

@rust-highfive rust-highfive assigned Aaron1011 and unassigned jackh726 Jun 30, 2021
@Aaron1011
Copy link
Member

This seems to make sense, but I wonder if there's some language design reason why this wasn't previously allowed.

cc @rust-lang/lang

@Aaron1011 Aaron1011 added T-lang Relevant to the language team, which will review and decide on the PR/issue. I-nominated S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 30, 2021
@nikomatsakis
Copy link
Contributor

Discussed in the @rust-lang/lang team meeting today. We weren't really sure what is being proposed here! @scottmcm is going to follow up and try to figure out how to describe the effects of this proposed PR on the language itself.

@crlf0710 crlf0710 added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Sep 10, 2021
@Dylan-DPC
Copy link
Member

@scottmcm any updates on the follow up?

@bors
Copy link
Contributor

bors commented Sep 27, 2022

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

@JohnCSimon
Copy link
Member

@FabianWolff
Ping from triage: I'm closing this due to inactivity, Please reopen when you are ready to continue with this.
Note: if you do please open the PR BEFORE you push to it, else you won't be able to reopen - this is a quirk of github.
Thanks for your contribution.

@rustbot label: +S-inactive

@JohnCSimon JohnCSimon closed this Nov 27, 2022
@rustbot rustbot added the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet