summaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/tuplepattern-restpattern-typecheck-err.rs
blob: d9f7c18f3ac452fb4919975c5d31e3a9957ec19a (plain)
1
2
3
4
5
6
7
8
fn main() {
    match (1, 2.2, "not 3") {
        // { dg-error "expected a tuple with 3 elements, found one with 5 elements" "" { target *-*-* } .+1 }
        (a, b, .., c, d, e) => {
            let _ = b + c; // { dg-error "cannot apply operator .+. to types <float> and & str" }
        }
    }
}