]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/lint-ctypes-73249-5.rs
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / lint-ctypes-73249-5.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 {
11     3
12 }
13
14 #[repr(transparent)]
15 pub struct A {
16     x: Qux,
17 }
18
19 extern "C" {
20     pub fn lint_me() -> A; //~ ERROR: uses type `Qux`
21 }
22
23 fn main() {}