File: pattern-match.rs

package info (click to toggle)
rust-ghost 0.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 216 kB
  • sloc: makefile: 2
file content (16 lines) | stat: -rw-r--r-- 219 bytes parent folder | download
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> => {}
    }
}