rust/tests/ui/lint/opaque-ty-ffi-unsafe.rs

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

16 lines
258 B
Rust
Raw Normal View History

#![feature(type_alias_impl_trait)]
2019-09-10 18:16:35 +01:00
#![deny(improper_ctypes)]
type A = impl Fn();
pub fn ret_closure() -> A {
|| {}
}
extern "C" {
pub fn a(_: A);
//~^ ERROR `extern` block uses type `A`, which is not FFI-safe [improper_ctypes]
2019-09-10 18:16:35 +01:00
}
fn main() {}