summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/opaque-ty-ffi-unsafe.rs
blob: 5faeac9ed4c38c44c947b339c18f3621be7858c9 (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(crate) fn ret_closure() -> A {
    || {}
}

extern "C" {
    pub(crate) fn a(_: A);
    //~^ ERROR `extern` block uses type `A`, which is not FFI-safe [improper_ctypes]
}

fn main() {}