diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2014-04-21 17:58:52 -0400 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-24 17:18:48 -0700 |
| commit | 9e3d0b002a5c2e81d43351c9b8550a3f4ccfb8f9 (patch) | |
| tree | 1e9a15e8a55cc3947025ab3ac044c2f7977159d9 /src/libnative | |
| parent | f7f95c8f5a6294f161800dbb65a0423bb5248f34 (diff) | |
| download | rust-9e3d0b002a5c2e81d43351c9b8550a3f4ccfb8f9.tar.gz rust-9e3d0b002a5c2e81d43351c9b8550a3f4ccfb8f9.zip | |
librustc: Remove the fallback to `int` from typechecking.
This breaks a fair amount of code. The typical patterns are:
* `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`;
* `println!("{}", 3)`: change to `println!("{}", 3i)`;
* `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`.
RFC #30. Closes #6023.
[breaking-change]
Diffstat (limited to 'src/libnative')
| -rw-r--r-- | src/libnative/io/c_unix.rs | 2 | ||||
| -rw-r--r-- | src/libnative/task.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libnative/io/c_unix.rs b/src/libnative/io/c_unix.rs index 7a52c048498..b1bc36e0b05 100644 --- a/src/libnative/io/c_unix.rs +++ b/src/libnative/io/c_unix.rs @@ -93,7 +93,7 @@ mod select { } pub fn fd_set(set: &mut fd_set, fd: i32) { - set.fds_bits[(fd / 32) as uint] |= 1 << (fd % 32); + set.fds_bits[(fd / 32) as uint] |= 1 << ((fd % 32) as uint); } } diff --git a/src/libnative/task.rs b/src/libnative/task.rs index 88e581a4791..8b7c8e61bc3 100644 --- a/src/libnative/task.rs +++ b/src/libnative/task.rs @@ -328,7 +328,7 @@ mod tests { fn yield_test() { let (tx, rx) = channel(); spawn(proc() { - for _ in range(0, 10) { task::deschedule(); } + for _ in range(0u, 10) { task::deschedule(); } tx.send(()); }); rx.recv(); |
