mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
f3b7dd6388
Only use it when the type alias contains an opaque type. Also does wf-checking on such type aliases.
16 lines
272 B
Rust
16 lines
272 B
Rust
#![feature(type_alias_impl_trait)]
|
|
#![deny(improper_ctypes)]
|
|
|
|
type A = impl Fn();
|
|
|
|
pub(crate) fn ret_closure() -> A {
|
|
|| {}
|
|
}
|
|
|
|
extern "C" {
|
|
pub(crate) fn a(_: A);
|
|
//~^ ERROR `extern` block uses type `A`, which is not FFI-safe [improper_ctypes]
|
|
}
|
|
|
|
fn main() {}
|