]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/opaque-ty-ffi-unsafe.rs
Handle `#[expect(unfulfilled_lint_expectations)]` with a lint message
[rust.git] / src / test / 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 `impl Fn()`, which is not FFI-safe [improper_ctypes]
13 }
14
15 fn main() {}