]> git.proxmox.com Git - rustc.git/blame - src/test/ui/lint/opaque-ty-ffi-unsafe.rs
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / lint / opaque-ty-ffi-unsafe.rs
CommitLineData
94222f64 1#![feature(type_alias_impl_trait)]
e1599b0c
XL
2#![deny(improper_ctypes)]
3
4type A = impl Fn();
5
6pub fn ret_closure() -> A {
7 || {}
8}
9
10extern "C" {
11 pub fn a(_: A);
ee023bcb 12 //~^ ERROR `extern` block uses type `A`, which is not FFI-safe [improper_ctypes]
e1599b0c
XL
13}
14
15fn main() {}