rust/tests/ui/c-variadic/variadic-ffi-6.rs

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

14 lines
272 B
Rust
Raw Normal View History

#![crate_type="lib"]
2019-02-24 22:40:11 +00:00
#![feature(c_variadic)]
pub unsafe extern "C" fn use_vararg_lifetime(
x: usize,
y: ...
) -> &usize { //~ ERROR missing lifetime specifier
&0
}
pub unsafe extern "C" fn use_normal_arg_lifetime(x: &usize, y: ...) -> &usize { // OK
x
}