about summary refs log tree commit diff
path: root/src/libcore/dvec.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-02-27 11:20:50 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-02-28 11:32:26 -0800
commit09a2b4e5992a0508c6ea91c030ccee11151f67ac (patch)
tree1f2ef67e3def0f64226cc3220a0534bda13d425b /src/libcore/dvec.rs
parent107bf96ff0dcc427c1842ffb232d29afaea53ca5 (diff)
librustc: Make methods private if the impl is private
Diffstat (limited to 'src/libcore/dvec.rs')
-rw-r--r--src/libcore/dvec.rs23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/libcore/dvec.rs b/src/libcore/dvec.rs
index 6c7c195b9d3..1fef4ad42f1 100644
--- a/src/libcore/dvec.rs
+++ b/src/libcore/dvec.rs
@@ -93,17 +93,6 @@ priv impl<A> DVec<A> {
     }
 
     #[inline(always)]
-    fn check_out<B>(f: &fn(v: ~[A]) -> B) -> B {
-        unsafe {
-            let mut data = cast::reinterpret_cast(&null::<()>());
-            data <-> self.data;
-            let data_ptr: *() = cast::reinterpret_cast(&data);
-            if data_ptr.is_null() { fail!(~"Recursive use of dvec"); }
-            return f(data);
-        }
-    }
-
-    #[inline(always)]
     fn give_back(data: ~[A]) {
         unsafe {
             self.data = data;
@@ -118,6 +107,18 @@ priv impl<A> DVec<A> {
 // almost nothing works without the copy bound due to limitations
 // around closures.
 pub impl<A> DVec<A> {
+    // FIXME (#3758): This should not need to be public.
+    #[inline(always)]
+    fn check_out<B>(f: &fn(v: ~[A]) -> B) -> B {
+        unsafe {
+            let mut data = cast::reinterpret_cast(&null::<()>());
+            data <-> self.data;
+            let data_ptr: *() = cast::reinterpret_cast(&data);
+            if data_ptr.is_null() { fail!(~"Recursive use of dvec"); }
+            return f(data);
+        }
+    }
+
     /// Reserves space for N elements
     fn reserve(count: uint) {
         vec::reserve(&mut self.data, count)