mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
16 lines
258 B
Rust
16 lines
258 B
Rust
#![feature(type_alias_impl_trait)]
|
|
#![deny(improper_ctypes)]
|
|
|
|
type A = impl Fn();
|
|
|
|
pub fn ret_closure() -> A {
|
|
|| {}
|
|
}
|
|
|
|
extern "C" {
|
|
pub fn a(_: A);
|
|
//~^ ERROR `extern` block uses type `A`, which is not FFI-safe [improper_ctypes]
|
|
}
|
|
|
|
fn main() {}
|