[go: up one dir, main page]

ghost 0.1.19

Define your own PhantomData
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use ghost::phantom;

#[phantom]
struct MyPhantom<T: ?Sized>;

fn main() {
    let phantom = MyPhantom::<u8>;

    match phantom {
        MyPhantom => {}
    }

    match phantom {
        MyPhantom::<u8> => {}
    }
}