summary refs log tree commit diff
path: root/src/test/ui/lint/opaque-ty-ffi-unsafe.rs
blob: 4ceb0c3da08232bb12163bdf45bb8af27abe0d9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![feature(type_alias_impl_trait)]
#![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
}

fn main() {}