ghost-lite 0.1.2

custom PhantomData types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::mem::size_of_val;

mod my_phantom {
    ghost_lite::ghost! {
        pub struct MyPhantom<T: ?Sized>
    }
}

pub fn my_phantom() -> my_phantom::MyPhantom<str> {
    my_phantom::MyPhantom
}

#[test]
fn test() {
    assert_eq!(size_of_val(&my_phantom()), 0)
}