]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/opaque-ty-ffi-unsafe.rs
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / opaque-ty-ffi-unsafe.rs
1 #![feature(type_alias_impl_trait)]
2 #![deny(improper_ctypes)]
3
4 type A = impl Fn();
5
6 pub fn ret_closure() -> A {
7     || {}
8 }
9
10 extern "C" {
11     pub fn a(_: A);
12     //~^ ERROR `extern` block uses type `A`, which is not FFI-safe [improper_ctypes]
13 }
14
15 fn main() {}