summaryrefslogtreecommitdiffstats
path: root/tests/ui/destructuring-assignment/tuple_destructure_fail.rs
blob: 4e3172d1973b2d04fef09e8862408cedfd48d4d5 (plain)
1
2
3
4
5
6
7
8
9
const C: i32 = 1;

fn main() {
    let (mut a, mut b);
    (a, .., b, ..) = (0, 1); //~ ERROR `..` can only be used once per tuple pattern
    (a, a, b) = (1, 2); //~ ERROR mismatched types
    (C, ..) = (0,1); //~ ERROR invalid left-hand side of assignment
    (_,) = (1, 2); //~ ERROR mismatched types
}