]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/lint-ctypes-73249-1.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / lint / lint-ctypes-73249-1.rs
1 // check-pass
2 #![deny(improper_ctypes)]
3
4 pub trait Foo {
5 type Assoc: 'static;
6 }
7
8 impl Foo for () {
9 type Assoc = u32;
10 }
11
12 extern "C" {
13 pub fn lint_me(x: Bar<()>);
14 }
15
16 #[repr(transparent)]
17 pub struct Bar<T: Foo> {
18 value: &'static <T as Foo>::Assoc,
19 }
20
21 fn main() {}