about summary refs log tree commit diff
path: root/src/libcollections/tree/set.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-11-17 11:22:00 +0000
committerbors <bors@rust-lang.org>2014-11-17 11:22:00 +0000
commit0047dbe59c41b951d34ce6324f3a8c0e15d523e9 (patch)
treee4f717adb4830ca6e737a23c81abbab3bb3a80b5 /src/libcollections/tree/set.rs
parentedfb83c9e28df2a8f326d688f3d5b1f6faa72db8 (diff)
parentca08540a0039e827114752d11166ea8cb1387068 (diff)
downloadrust-0047dbe59c41b951d34ce6324f3a8c0e15d523e9.tar.gz
rust-0047dbe59c41b951d34ce6324f3a8c0e15d523e9.zip
auto merge of #19027 : nick29581/rust/coercions-4, r=alexcrichton
The forwards compatible parts of #18645, rebased. Converts implicit coercions from `[T, ..n]` to `&[T]` into explicit references.
Diffstat (limited to 'src/libcollections/tree/set.rs')
-rw-r--r--src/libcollections/tree/set.rs58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/libcollections/tree/set.rs b/src/libcollections/tree/set.rs
index 1005732a1e2..abfaeed7e7e 100644
--- a/src/libcollections/tree/set.rs
+++ b/src/libcollections/tree/set.rs
@@ -860,14 +860,14 @@ mod test {
             check(a, b, expected, |x, y, f| x.intersection(y).all(f))
         }
 
-        check_intersection([], [], []);
-        check_intersection([1, 2, 3], [], []);
-        check_intersection([], [1, 2, 3], []);
-        check_intersection([2], [1, 2, 3], [2]);
-        check_intersection([1, 2, 3], [2], [2]);
-        check_intersection([11, 1, 3, 77, 103, 5, -5],
-                           [2, 11, 77, -9, -42, 5, 3],
-                           [3, 5, 11, 77]);
+        check_intersection(&[], &[], &[]);
+        check_intersection(&[1, 2, 3], &[], &[]);
+        check_intersection(&[], &[1, 2, 3], &[]);
+        check_intersection(&[2], &[1, 2, 3], &[2]);
+        check_intersection(&[1, 2, 3], &[2], &[2]);
+        check_intersection(&[11, 1, 3, 77, 103, 5, -5],
+                           &[2, 11, 77, -9, -42, 5, 3],
+                           &[3, 5, 11, 77]);
     }
 
     #[test]
@@ -876,15 +876,15 @@ mod test {
             check(a, b, expected, |x, y, f| x.difference(y).all(f))
         }
 
-        check_difference([], [], []);
-        check_difference([1, 12], [], [1, 12]);
-        check_difference([], [1, 2, 3, 9], []);
-        check_difference([1, 3, 5, 9, 11],
-                         [3, 9],
-                         [1, 5, 11]);
-        check_difference([-5, 11, 22, 33, 40, 42],
-                         [-12, -5, 14, 23, 34, 38, 39, 50],
-                         [11, 22, 33, 40, 42]);
+        check_difference(&[], &[], &[]);
+        check_difference(&[1, 12], &[], &[1, 12]);
+        check_difference(&[], &[1, 2, 3, 9], &[]);
+        check_difference(&[1, 3, 5, 9, 11],
+                         &[3, 9],
+                         &[1, 5, 11]);
+        check_difference(&[-5, 11, 22, 33, 40, 42],
+                         &[-12, -5, 14, 23, 34, 38, 39, 50],
+                         &[11, 22, 33, 40, 42]);
     }
 
     #[test]
@@ -894,12 +894,12 @@ mod test {
             check(a, b, expected, |x, y, f| x.symmetric_difference(y).all(f))
         }
 
-        check_symmetric_difference([], [], []);
-        check_symmetric_difference([1, 2, 3], [2], [1, 3]);
-        check_symmetric_difference([2], [1, 2, 3], [1, 3]);
-        check_symmetric_difference([1, 3, 5, 9, 11],
-                                   [-2, 3, 9, 14, 22],
-                                   [-2, 1, 5, 11, 14, 22]);
+        check_symmetric_difference(&[], &[], &[]);
+        check_symmetric_difference(&[1, 2, 3], &[2], &[1, 3]);
+        check_symmetric_difference(&[2], &[1, 2, 3], &[1, 3]);
+        check_symmetric_difference(&[1, 3, 5, 9, 11],
+                                   &[-2, 3, 9, 14, 22],
+                                   &[-2, 1, 5, 11, 14, 22]);
     }
 
     #[test]
@@ -909,12 +909,12 @@ mod test {
             check(a, b, expected, |x, y, f| x.union(y).all(f))
         }
 
-        check_union([], [], []);
-        check_union([1, 2, 3], [2], [1, 2, 3]);
-        check_union([2], [1, 2, 3], [1, 2, 3]);
-        check_union([1, 3, 5, 9, 11, 16, 19, 24],
-                    [-2, 1, 5, 9, 13, 19],
-                    [-2, 1, 3, 5, 9, 11, 13, 16, 19, 24]);
+        check_union(&[], &[], &[]);
+        check_union(&[1, 2, 3], &[2], &[1, 2, 3]);
+        check_union(&[2], &[1, 2, 3], &[1, 2, 3]);
+        check_union(&[1, 3, 5, 9, 11, 16, 19, 24],
+                    &[-2, 1, 5, 9, 13, 19],
+                    &[-2, 1, 3, 5, 9, 11, 13, 16, 19, 24]);
     }
 
     #[test]