]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/lint-ctypes-73249-1.rs
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / 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() {}