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
struct Thing{ a: u8, b: u8 }
fn main(){
let mut boxed_thing = box Thing{a:2, b:2};
let btr = &mut boxed_thing;
let (a, b) = (&mut btr.a, &mut btr.b);
//error: cannot borrow `btr.b` as mutable more than once at a time
//note: previous borrow of `btr.a` occurs here; the mutable borrow prevents subsequent moves, borrows, or modification of `btr.a` until the borrow ends
//let (a, b) = (&mut btr.a, &mut btr.b);
// ^~~~~
}
The text was updated successfully, but these errors were encountered:
makoConstruct
changed the title
confusing compile error for second partial moves(?) from Boxes, refers to second member rather than box itself
confusing compile error for second partial moves(?) from Boxes, refers to members rather than box itself
Sep 15, 2014
makoConstruct
changed the title
confusing compile error for second partial moves(?) from Boxes, refers to members rather than box itself
confusing compile error for second partial borrows of/from Boxes, refers to members rather than box itself
Sep 15, 2014
The text was updated successfully, but these errors were encountered: