Skip to content

Remove special root for @ #13559

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

Merged
merged 12 commits into from
Apr 24, 2014
Merged

Remove special root for @ #13559

merged 12 commits into from
Apr 24, 2014

Conversation

flaper87
Copy link
Contributor

This patch removes the special auto-rooting for @ from the borrow checker. With @ moving into a library, it doesn't make sense to keep this code around anymore. It also simplifies trans by removing root checking from there

@nikomatsakis

Closes: #11586

@nikomatsakis nikomatsakis self-assigned this Apr 16, 2014
@flaper87
Copy link
Contributor Author

I believe this is a breaking change for scenarios using managed pointers. I'll update the commits accordingly.

@nikomatsakis
Copy link
Contributor

@flaper87 yes, I was going to mention that.

@nikomatsakis
Copy link
Contributor

@flaper87 so -- we definitely should see compilation errors for those tests. The reason we weren't is that my suggested changes to borrowck were incorrect. We basically want to treat @T pointers the same way we treat ~T. Longer term, we'd like to remove all knowledge of how to deref @T from the compiler. I tried to prototype that but ran into a bit of trickiness around coercions, so for the time being I think you want to make changes like these:

nikomatsakis@823f7bb

@nikomatsakis
Copy link
Contributor

Note: that patch I pointed you at leaves some dead code that can be cleaned up. And I think we can remove the moved_variables_set altogether.

@nikomatsakis
Copy link
Contributor

@flaper87 this looks great; however, can you do a bit of cleanup:

  1. remove the [breaking-change] annotation except for on one commit that explains what is happening and what people can do to fix it.
  2. squash together the test and borrowck changes (I don't care if my authorship is preserved) so that we don't have intermediate, invalid states where the code was wrong.

@flaper87
Copy link
Contributor Author

@nikomatsakis roger that!

re [breaking-change] annotation, I mentioned in the email thread that it would probably be worth keeping it in all the commits of the same change. I thought that was fine. I'll get rid of it.

Unfortunately, this change is not ready to be merged, stage2 syntax fails to compile due to some borrowed values not living long enough. I'll fix that

flaper87 added 11 commits April 23, 2014 18:19
`@` pointers used to have special rooting and regions management. With `@`
moving to standalone library, we don't need to keep that special
treatment around. This patch modifies the way `@` pointers are treated by
treating them as if they were `~` pointers

Region checker and borrow checker were modified in this patch.

Closes rust-lang#11586

[breaking-change]
bors added a commit that referenced this pull request Apr 24, 2014
This patch removes the special auto-rooting for `@` from the borrow checker. With `@` moving into a library, it doesn't make sense to keep this code around anymore. It also simplifies `trans` by removing root checking from there 

@nikomatsakis

Closes: #11586
@bors bors closed this Apr 24, 2014
@bors bors merged commit 6fa1f48 into rust-lang:master Apr 24, 2014
@flaper87 flaper87 deleted the remove-special-root branch April 24, 2014 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove special rooting for @T
5 participants