summary refs log tree commit diff
path: root/src/test/compile-fail/alt-range-fail.rs
blob: 0a9acdcd4b98b63b86352d4ecdd8b95abe8ead36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//error-pattern: lower range bound
//error-pattern: non-numeric
//error-pattern: mismatched types

fn main() {
    alt 5u {
      6u to 1u { }
      _ { }
    };

    alt "wow" {
      "wow" to "woow" { }
    };

    alt 5u {
      'c' to 100u { }
      _ { }
    };
}