summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/variadic-ffi-nested-syntactic-fail.rs
blob: f1238ec240f8f5984a69bbcde471a1478b246ed0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
fn f1<'a>(x: u8, y: &'a ...) {}
//~^ ERROR C-variadic type `...` may not be nested inside another type

fn f2<'a>(x: u8, y: Vec<&'a ...>) {}
//~^ ERROR C-variadic type `...` may not be nested inside another type

fn main() {
    // While this is an error, wf-checks happen before typeck, and if any wf-checks
    // encountered errors, we do not continue to typeck, even if the items are
    // unrelated.
    // FIXME(oli-obk): make this report a type mismatch again.
    let _recovery_witness: () = 0;
}