]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/lint-ctypes-73249-3.rs
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / test / ui / lint / lint-ctypes-73249-3.rs
1 #![feature(type_alias_impl_trait)]
2 #![deny(improper_ctypes)]
3
4 pub trait Baz { }
5
6 impl Baz for u32 { }
7
8 type Qux = impl Baz;
9
10 fn assign() -> Qux { 3 }
11
12 #[repr(C)]
13 pub struct A {
14 x: Qux,
15 }
16
17 extern "C" {
18 pub fn lint_me() -> A; //~ ERROR: uses type `impl Baz`
19 }
20
21 fn main() {}