rust/tests/ui/c-variadic/variadic-unreachable-arg-error.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
220 B
Rust
Raw Normal View History

2021-12-27 22:18:17 -06:00
//@ check-pass
#![feature(c_variadic)]
extern "C" {
fn foo(f: isize, x: u8, ...);
}
fn main() {
unsafe {
// FIXME: Ideally we could give an unreachable warning
foo(1, loop {}, 1usize);
}
}