summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.rs
blob: 6c913c245130d7307b7c8361731568bbc76385b1 (plain)
1
2
3
4
5
6
7
8
9
10
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
}