aboutsummaryrefslogtreecommitdiff
path: root/tests/module/mod.rs
blob: 0fe3e5b93f182efb5d6b69b1528fc92cc50252a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod declaration {
    use linkme::distributed_slice;

    #[distributed_slice]
    pub static SLICE: [i32] = [..];

    #[test]
    fn test_mod_slice() {
        assert!(!SLICE.is_empty());
    }
}

mod usage {
    use linkme::distributed_slice;

    #[distributed_slice(super::declaration::SLICE)]
    pub static N: i32 = 9;
}