]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/lint-ctypes-73249-4.rs
Rollup merge of #106889 - scottmcm:windows-mut, r=cuviper
[rust.git] / tests / ui / lint / lint-ctypes-73249-4.rs
1 // check-pass
2 #![deny(improper_ctypes)]
3
4 use std::marker::PhantomData;
5
6 trait Foo {
7     type Assoc;
8 }
9
10 impl Foo for () {
11     type Assoc = PhantomData<()>;
12 }
13
14 #[repr(transparent)]
15 struct Wow<T> where T: Foo<Assoc = PhantomData<T>> {
16     x: <T as Foo>::Assoc,
17     v: u32,
18 }
19
20 extern "C" {
21     fn test(v: Wow<()>);
22 }
23
24 fn main() {}