]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/dead-code/type-in-foreign.rs
Auto merge of #101138 - Rejyr:diagnostic-migration-rustc-lint-pt2, r=davidtwco
[rust.git] / tests / ui / lint / dead-code / type-in-foreign.rs
1 // Verify that we do not warn on types that are used by foreign functions.
2 // check-pass
3 #![deny(dead_code)]
4
5 #[repr(C)]
6 struct Type(u8);
7
8 #[repr(C)]
9 struct Param(u8);
10
11 extern "C" {
12     #[allow(dead_code)]
13     fn hey(t: Param);
14
15     #[allow(dead_code)]
16     static much: Type;
17 }
18
19 fn main() {}