blob: 1dd66aad57a33f71afe27f1c0362f54c064db53b [file] [log] [blame]
fn main() {
struct U;
// A tuple is a "non-reference pattern".
// A `mut` binding pattern resets the binding mode to by-value.
let p = (U, U);
let (a, mut b) = &p;
//~^ ERROR cannot move out of a shared reference
let mut p = (U, U);
let (a, mut b) = &mut p;
//~^ ERROR cannot move out of a mutable reference
}