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
use std::util;
fn main() {
let mut x = ();
util::ignore((&mut x, util::ignore(&mut x)));
}
The error is "can't borrow x as mutable more than once at a time", even though a trivial rewrite of the program would show that the first borrow doesn't live until the second function call is made.
In case this looks too contrived, the actual code I was writing when I ran into this was: