aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2850.rs
blob: 62cbe0f6524b2c5930e567e61f5cf106767bea54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn myfun0(...,_:i32) {}
// { dg-error "only foreign or .unsafe extern \"C\". functions may be C-variadic" "" { target *-*-* } .-1 }

fn myfun1(a:i32,...,_:i32) {}
// { dg-error "only foreign or .unsafe extern \"C\". functions may be C-variadic" "" { target *-*-* } .-1 }

struct z {
    x: f64,
    y: f64,
}

impl z {
    fn new(x: f64, ..., y: f64) -> z {
        // { dg-error "only foreign or .unsafe extern \"C\". functions may be C-variadic" "" { target *-*-* } .-1 }
        z { x: x, y: y }
    }
}