error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:23:9 | LL | let ref a @ b = U; | -----^^^- | | | | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:25:9 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (U, U); | -----^^^^^^^^^^^^-----^^^^^^^^^^-^ | | | | | | | move out of `a` occurs here | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `b` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:25:18 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (U, U); | -----^^^----- | | | | | move out of `b` occurs here | borrow of `b` occurs here error: cannot move out of `d` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:25:33 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (U, U); | -----^^^- | | | | | move out of `d` occurs here | borrow of `d` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:29:9 | LL | let ref mut a @ [b, mut c] = [U, U]; | ---------^^^^-^^-----^ | | | | | | | move out of `a` occurs here | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:31:9 | LL | let ref a @ b = u(); | -----^^^- | | | | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:33:9 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u()); | -----^^^^^^^^^^^^-----^^^^^^^^^^-^ | | | | | | | move out of `a` occurs here | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `b` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:33:18 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u()); | -----^^^----- | | | | | move out of `b` occurs here | borrow of `b` occurs here error: cannot move out of `d` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:33:33 | LL | let ref a @ (ref b @ mut c, ref d @ e) = (u(), u()); | -----^^^- | | | | | move out of `d` occurs here | borrow of `d` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:37:9 | LL | let ref mut a @ [b, mut c] = [u(), u()]; | ---------^^^^-^^-----^ | | | | | | | move out of `a` occurs here | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:41:9 | LL | ref a @ Some(b) => {} | -----^^^^^^^^-^ | | | | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:46:9 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | -----^^^^^^^^^^^^^^^^^-----^^^^^^^^^^-^^ | | | | | | | move out of `a` occurs here | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `b` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:46:23 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | -----^^^----- | | | | | move out of `b` occurs here | borrow of `b` occurs here error: cannot move out of `d` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:46:38 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | -----^^^- | | | | | move out of `d` occurs here | borrow of `d` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:53:9 | LL | ref mut a @ Some([b, mut c]) => {} | ---------^^^^^^^^^-^^-----^^ | | | | | | | move out of `a` occurs here | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:58:9 | LL | ref a @ Some(b) => {} | -----^^^^^^^^-^ | | | | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:63:9 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | -----^^^^^^^^^^^^^^^^^-----^^^^^^^^^^-^^ | | | | | | | move out of `a` occurs here | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `b` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:63:23 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | -----^^^----- | | | | | move out of `b` occurs here | borrow of `b` occurs here error: cannot move out of `d` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:63:38 | LL | ref a @ Some((ref b @ mut c, ref d @ e)) => {} | -----^^^- | | | | | move out of `d` occurs here | borrow of `d` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:70:9 | LL | ref mut a @ Some([b, mut c]) => {} | ---------^^^^^^^^^-^^-----^^ | | | | | | | move out of `a` occurs here | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:14:11 | LL | fn f1(ref a @ b: U) {} | -----^^^- | | | | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:16:11 | LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {} | -----^^^^^^^^^^^^-----^^^^^^^^^^-^ | | | | | | | move out of `a` occurs here | | move out of `a` occurs here | borrow of `a` occurs here error: cannot move out of `b` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:16:20 | LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {} | -----^^^----- | | | | | move out of `b` occurs here | borrow of `b` occurs here error: cannot move out of `d` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:16:35 | LL | fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {} | -----^^^- | | | | | move out of `d` occurs here | borrow of `d` occurs here error: cannot move out of `a` because it is borrowed --> $DIR/borrowck-pat-by-move-and-ref.rs:20:11 | LL | fn f3(ref mut a @ [b, mut c]: [U; 2]) {} | ---------^^^^-^^-----^ | | | | | | | move out of `a` occurs here | | move out of `a` occurs here | borrow of `a` occurs here error: aborting due to 25 previous errors