summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/dead-code/type-in-foreign.rs
blob: b6c593f316f05ac6efce5a0dc88aaec978f2161b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Verify that we do not warn on types that are used by foreign functions.
// check-pass
#![deny(dead_code)]

#[repr(C)]
struct Type(u8);

#[repr(C)]
struct Param(u8);

extern "C" {
    #[allow(dead_code)]
    fn hey(t: Param);

    #[allow(dead_code)]
    static much: Type;
}

fn main() {}