]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0058_range_pat.rs
:arrow_up: rust-analyzer
[rust.git] / src / tools / rust-analyzer / crates / parser / test_data / parser / inline / ok / 0058_range_pat.rs
index 2411d51096b3b0a1c65f884b8d103d9ba1f5fc54..b54354211d2dcf03ea7f8d98c625c451bb1c3362 100644 (file)
@@ -4,25 +4,30 @@ fn main() {
         101 ..= 200 => (),
         200 .. 301 => (),
         302 .. => (),
+        ..= 303 => (),
     }
 
     match Some(10 as u8) {
         Some(0) | None => (),
-        Some(1..) => ()
+        Some(1..) => (),
+        Some(..=2) => (),
     }
 
     match () {
         S { a: 0 } => (),
         S { a: 1.. } => (),
+        S { a: ..=2 } => (),
     }
 
     match () {
         [0] => (),
         [1..] => (),
+        [..=2] => (),
     }
 
     match (10 as u8, 5 as u8) {
         (0, _) => (),
-        (1.., _) => ()
+        (1.., _) => (),
+        (..=2, _) => (),
     }
 }