about summary refs log tree commit diff
path: root/src/libnative/io
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-09-26 21:13:20 -0700
committerPatrick Walton <pcwalton@mimiga.net>2014-09-30 09:11:26 -0700
commit416144b8279fbffceacea6d0fd90e0fd1f8ce53d (patch)
tree0f7f628dd1388f378ac4836e32359b18a7297212 /src/libnative/io
parent38015eeb7010e5954a1bc60fddc1214a5f359627 (diff)
downloadrust-416144b8279fbffceacea6d0fd90e0fd1f8ce53d.tar.gz
rust-416144b8279fbffceacea6d0fd90e0fd1f8ce53d.zip
librustc: Forbid `..` in range patterns.
This breaks code that looks like:

    match foo {
        1..3 => { ... }
    }

Instead, write:

    match foo {
        1...3 => { ... }
    }

Closes #17295.

[breaking-change]
Diffstat (limited to 'src/libnative/io')
-rw-r--r--src/libnative/io/tty_windows.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libnative/io/tty_windows.rs b/src/libnative/io/tty_windows.rs
index 7263036e165..1c3904a8943 100644
--- a/src/libnative/io/tty_windows.rs
+++ b/src/libnative/io/tty_windows.rs
@@ -67,7 +67,7 @@ impl WindowsTTY {
         // If the file descriptor is one of stdin, stderr, or stdout
         // then it should not be closed by us
         let closeme = match fd {
-            0..2 => false,
+            0...2 => false,
             _ => true,
         };
         let handle = unsafe { get_osfhandle(fd) as HANDLE };