You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can unfreeze with a temporary borrowed pointer, because it doesn't restore the previous state:
fnmain(){let x = @mut5;let a = &*x;{let b = &*x;}let c = &mut*x;}
Mutable borrows aren't tracked:
fnmain(){let x = @mut5;let a = &mut*x;let b = &mut*x;let c = &*x;}
I think freezing needs to be enum Borrow { Mutable, Immutable, Nothing } with an immutable borrow failing if there was a Mutable one, and a mutable borrow failing on any freeze.
Activity
nikomatsakis commentedon May 1, 2013
Yeah, this code is not really right. I have some parts of this fixed in my borrow checker branch, and I've started a branch to take care of the rest.
nikomatsakis commentedon May 7, 2013
These issues are resolved. See the following run-pass and run-fail tests:
Auto merge of rust-lang#5910 - flip1995:rustup, r=flip1995
Merge rust-lang#5910 rust-lang#5912