summaryrefslogtreecommitdiff
path: root/samples/test/enums.rs
blob: 38d4eb15fd424daf8c1dd7b1f937d56041343aa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

enum Values
{
    One,
    Two,
    Three,
}

fn main()
{
    assert!(match Some(&1) { Some(1) => true, _ => false });
    assert!(match Some(1) { Some(1) => true, _ => false });
    assert!(match Values::One { Values::One => true, _ => false });
}