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
#![feature(unboxed_closures, overloaded_calls)]fnmain(){letmut v = vec![];letref f = |&:| { v.push(0u); v.get_mut(0)};let x = (*f)();for _ inrange(0u,5){(*f)();}*x = 42u;}
Borrowck needs to consider upvars in capture-by-ref, self-by-ref unboxed closures to be aliasable so that mutation and mutable borrows are rejected. I'm working on a patch to do this.