rust/src/test/ui/lint/opaque-ty-ffi-unsafe.rs

18 lines
343 B
Rust
Raw Normal View History

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