about summary refs log tree commit diff
path: root/src/libsync/spsc_queue.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2014-04-21 17:58:52 -0400
committerAlex Crichton <alex@alexcrichton.com>2014-06-24 17:18:48 -0700
commit9e3d0b002a5c2e81d43351c9b8550a3f4ccfb8f9 (patch)
tree1e9a15e8a55cc3947025ab3ac044c2f7977159d9 /src/libsync/spsc_queue.rs
parentf7f95c8f5a6294f161800dbb65a0423bb5248f34 (diff)
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/libsync/spsc_queue.rs')
-rw-r--r--src/libsync/spsc_queue.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsync/spsc_queue.rs b/src/libsync/spsc_queue.rs
index 55d2f3062ba..a4da1fd2335 100644
--- a/src/libsync/spsc_queue.rs
+++ b/src/libsync/spsc_queue.rs
@@ -237,7 +237,7 @@ mod test {
     #[test]
     fn smoke() {
         let q = Queue::new(0);
-        q.push(1);
+        q.push(1i);
         q.push(2);
         assert_eq!(q.pop(), Some(1));
         assert_eq!(q.pop(), Some(2));
@@ -259,7 +259,7 @@ mod test {
     #[test]
     fn smoke_bound() {
         let q = Queue::new(1);
-        q.push(1);
+        q.push(1i);
         q.push(2);
         assert_eq!(q.pop(), Some(1));
         assert_eq!(q.pop(), Some(2));
@@ -281,7 +281,7 @@ mod test {
             let b = a.clone();
             let (tx, rx) = channel();
             native::task::spawn(proc() {
-                for _ in range(0, 100000) {
+                for _ in range(0u, 100000) {
                     loop {
                         match b.pop() {
                             Some(1) => break,
@@ -292,7 +292,7 @@ mod test {
                 }
                 tx.send(());
             });
-            for _ in range(0, 100000) {
+            for _ in range(0i, 100000) {
                 a.push(1);
             }
             rx.recv();