summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/lint-ctypes-73249-4.rs
blob: 6c72bd691b17cf5a22f291265bc237b0c96f78d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// check-pass
#![deny(improper_ctypes)]

use std::marker::PhantomData;

trait Foo {
    type Assoc;
}

impl Foo for () {
    type Assoc = PhantomData<()>;
}

#[repr(transparent)]
struct Wow<T> where T: Foo<Assoc = PhantomData<T>> {
    x: <T as Foo>::Assoc,
    v: u32,
}

extern "C" {
    fn test(v: Wow<()>);
}

fn main() {}