PageRenderTime 50ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/src/test/compile-fail/alt-range-fail.rs

https://bitbucket.org/graydon/rust
Rust | 19 lines | 13 code | 3 blank | 3 comment | 0 complexity | 7c520ddf393f6bb5f59c84f1cd5c1879 MD5 | raw file
  1. //error-pattern: lower range bound
  2. //error-pattern: non-numeric
  3. //error-pattern: mismatched types
  4. fn main() {
  5. match 5u {
  6. 6u .. 1u => { }
  7. _ => { }
  8. };
  9. match "wow" {
  10. "bar" .. "foo" => { }
  11. };
  12. match 5u {
  13. 'c' .. 100u => { }
  14. _ => { }
  15. };
  16. }