-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Implement RFC #43 #16102
Implement RFC #43 #16102
Conversation
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 |
I will review but it is difficult this week due to TC39. |
@@ -28,6 +28,57 @@ use util::ppaux::Repr; | |||
|
|||
use std::rc::Rc; | |||
|
|||
// FIXME: These functions are intended to allow the borrow checker to be less |
There was a problem hiding this comment.
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?
Looks good modulo that one nit. |
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]
Updated to address @pcwalton's nit. |
This removes the ability of the borrow checker to determine that repeated dereferences of a Box<T> refer to the same memory object.
@@ -1,4 +1,4 @@ | |||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT | |||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT |
There was a problem hiding this comment.
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
?
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