From 9fd970ad13bca7f6155ed15901492cd190c81616 Mon Sep 17 00:00:00 2001 From: William Ting Date: Fri, 11 Jan 2013 02:27:01 -0600 Subject: [PATCH] Adds priv qualifiers where they have been commented out before implementation. Updates #4386. --- src/libcore/cleanup.rs | 3 ++- src/libstd/future.rs | 2 +- src/libstd/sync.rs | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/libcore/cleanup.rs b/src/libcore/cleanup.rs index 92cddf77187..c8b96b9b23b 100644 --- a/src/libcore/cleanup.rs +++ b/src/libcore/cleanup.rs @@ -160,6 +160,7 @@ pub unsafe fn annihilate() { extern mod rustrt { #[legacy_exports]; #[rust_stack] - /*priv*/ unsafe fn rust_get_task() -> *c_void; + // FIXME (#4386): Unable to make following method private. + /* priv */ unsafe fn rust_get_task() -> *c_void; } diff --git a/src/libstd/future.rs b/src/libstd/future.rs index 6a34c29b516..7d61326c02f 100644 --- a/src/libstd/future.rs +++ b/src/libstd/future.rs @@ -31,7 +31,7 @@ #[doc = "The future type"] pub struct Future { - /*priv*/ mut state: FutureState, + priv mut state: FutureState, } // FIXME(#2829) -- futures should not be copyable, because they close diff --git a/src/libstd/sync.rs b/src/libstd/sync.rs index a883062c4b9..ce7a8481ffd 100644 --- a/src/libstd/sync.rs +++ b/src/libstd/sync.rs @@ -449,9 +449,9 @@ struct RWlockInner { * unwinds. */ struct RWlock { - /* priv */ order_lock: Semaphore, - /* priv */ access_lock: Sem<~[mut Waitqueue]>, - /* priv */ state: Exclusive + priv order_lock: Semaphore, + priv access_lock: Sem<~[mut Waitqueue]>, + priv state: Exclusive } /// Create a new rwlock, with one associated condvar. @@ -683,7 +683,7 @@ fn RWlockReleaseDowngrade(lock: &r/RWlock) -> RWlockReleaseDowngrade/&r { } /// The "write permission" token used for rwlock.write_downgrade(). -pub struct RWlockWriteMode { /* priv */ lock: &RWlock } +pub struct RWlockWriteMode { priv lock: &RWlock } impl RWlockWriteMode : Drop { fn finalize(&self) {} } /// The "read permission" token used for rwlock.write_downgrade(). pub struct RWlockReadMode { priv lock: &RWlock } -- GitLab