blob: a5b791fbca800e8a7cbbb8cff663635abbcf8009 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  | 
#![feature(c_variadic)]
#![crate_type = "lib"]
// Check that `...` in closures is rejected.
const F: extern "C" fn(...) = |_: ...| {};
//~^ ERROR C-variadic type `...` may not be nested inside another type
fn foo() {
    let f = |...| {};
    //~^ ERROR: unexpected `...`
    let f = |_: ...| {};
    //~^ ERROR C-variadic type `...` may not be nested inside another type
    f(1i64)
}
 
  |