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

pub trait Foo {
    type Assoc: 'static;
}

impl Foo for () {
    type Assoc = u32;
}

extern "C" {
    pub fn lint_me(x: Bar<()>);
}

#[repr(transparent)]
pub struct Bar<T: Foo> {
    value: &'static <T as Foo>::Assoc,
}

fn main() {}