Skip to content

Conversation

zwarich
Copy link

@zwarich zwarich commented Jul 30, 2014

This removes the ability of the borrow checker to determine that repeated dereferences of a Box refer to the same memory object.

update: document RFC 130; PR: rust-lang/rfcs#130

@zwarich
Copy link
Author

zwarich commented Jul 30, 2014

In a way, this is kind of a hack to make the borrow checker stupider than it actually is, but I don't know of a better way to do this while supporting OwnedPtr in LoanPath for moves.

@zwarich
Copy link
Author

zwarich commented Jul 30, 2014

CC @nikomatsakis @pcwalton

@nikomatsakis
Copy link
Contributor

I will review but it is difficult this week due to TC39.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put an issue # here?

@pcwalton
Copy link
Contributor

Looks good modulo that one nit.

Cameron Zwarich added 4 commits July 30, 2014 13:36
Remove the ability of the borrow checker to determine that repeated
dereferences of a Box<T> refer to the same memory object. This will
usually require one of two workarounds:

1) The interior of a Box<T> will sometimes need to be moved / borrowed
into a temporary before moving / borrowing individual derived paths.

2) A `ref x` pattern will have to be replaced with a `box ref x`
pattern.

Fixes #16094.

[breaking-change]
@zwarich
Copy link
Author

zwarich commented Jul 30, 2014

Updated to address @pcwalton's nit.

bors added a commit that referenced this pull request Aug 1, 2014
This removes the ability of the borrow checker to determine that repeated dereferences of a Box<T> refer to the same memory object.
@bors bors closed this Aug 1, 2014
@bors bors merged commit 5d4d09d into rust-lang:master Aug 1, 2014
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the year be 2012-2014?

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.

5 participants