]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/opaque-ty-ffi-unsafe.rs
Rollup merge of #87180 - notriddle:notriddle/sidebar-keyboard-mobile, r=GuillaumeGomez
[rust.git] / src / test / ui / lint / opaque-ty-ffi-unsafe.rs
1 // revisions: min_tait full_tait
2 #![feature(min_type_alias_impl_trait)]
3 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
4 //[full_tait]~^ WARN incomplete
5 #![deny(improper_ctypes)]
6
7 type A = impl Fn();
8
9 pub fn ret_closure() -> A {
10     || {}
11 }
12
13 extern "C" {
14     pub fn a(_: A);
15 //~^ ERROR `extern` block uses type `impl Fn<()>`, which is not FFI-safe
16 }
17
18 fn main() {}