2021-07-26 15:01:16 -05:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2019-09-10 12:16:35 -05:00
|
|
|
#![deny(improper_ctypes)]
|
|
|
|
|
|
|
|
type A = impl Fn();
|
|
|
|
|
2023-03-07 06:03:11 -06:00
|
|
|
pub(crate) fn ret_closure() -> A {
|
2019-09-10 12:16:35 -05:00
|
|
|
|| {}
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" {
|
2023-03-07 06:03:11 -06:00
|
|
|
pub(crate) fn a(_: A);
|
2022-02-14 10:10:22 -06:00
|
|
|
//~^ ERROR `extern` block uses type `A`, which is not FFI-safe [improper_ctypes]
|
2019-09-10 12:16:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|