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