mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-25 00:37:35 +00:00
17 lines
390 B
Rust
17 lines
390 B
Rust
#![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)
|
|
}
|