PageRenderTime 44ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://bitbucket.org/graydon/rust
Rust | 37 lines | 27 code | 5 blank | 5 comment | 0 complexity | 9927e90327e7ef211241cef7c2846ed3 MD5 | raw file
  1. //error-pattern: unreachable
  2. //error-pattern: unreachable
  3. //error-pattern: unreachable
  4. //error-pattern: unreachable
  5. //error-pattern: unreachable
  6. fn main() {
  7. match 5u {
  8. 1u .. 10u => { }
  9. 5u .. 6u => { }
  10. _ => {}
  11. };
  12. match 5u {
  13. 3u .. 6u => { }
  14. 4u .. 6u => { }
  15. _ => {}
  16. };
  17. match 5u {
  18. 4u .. 6u => { }
  19. 4u .. 6u => { }
  20. _ => {}
  21. };
  22. match 'c' {
  23. 'A' .. 'z' => {}
  24. 'a' .. 'z' => {}
  25. _ => {}
  26. };
  27. match 1.0 {
  28. 0.01 .. 6.5 => {}
  29. 0.02 => {}
  30. _ => {}
  31. };
  32. }