about summary refs log tree commit diff
path: root/src/libsync
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-10 09:49:29 -0700
committerbors <bors@rust-lang.org>2014-06-10 09:49:29 -0700
commit9bb8f88d3a79d3f8f10dca8cedf00cf57f6a94f6 (patch)
tree6b900931014b0ea0ed76e2b6ee5ab2f78583b165 /src/libsync
parent0ee6a8e8a564ec0134ebdc0869fab5e4bb28024c (diff)
parent8e34f647ee5db795e1ea46715de61cee63f4f4a7 (diff)
downloadrust-9bb8f88d3a79d3f8f10dca8cedf00cf57f6a94f6.tar.gz
rust-9bb8f88d3a79d3f8f10dca8cedf00cf57f6a94f6.zip
auto merge of #14696 : jakub-/rust/dead-struct-fields, r=alexcrichton
This uncovered some dead code, most notably in middle/liveness.rs, which I think suggests there must be something fishy with that part of the code.

The #[allow(dead_code)] annotations on some of the fields I am not super happy about but as I understand, marker type may disappear at some point.
Diffstat (limited to 'src/libsync')
-rw-r--r--src/libsync/raw.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsync/raw.rs b/src/libsync/raw.rs
index 8fd10cdfa8b..821afeaa1f2 100644
--- a/src/libsync/raw.rs
+++ b/src/libsync/raw.rs
@@ -355,7 +355,7 @@ pub struct Semaphore {
 /// dropped, this value will release the resource back to the semaphore.
 #[must_use]
 pub struct SemaphoreGuard<'a> {
-    guard: SemGuard<'a, ()>,
+    _guard: SemGuard<'a, ()>,
 }
 
 impl Semaphore {
@@ -375,7 +375,7 @@ impl Semaphore {
     /// Acquire a resource of this semaphore, returning an RAII guard which will
     /// release the resource when dropped.
     pub fn access<'a>(&'a self) -> SemaphoreGuard<'a> {
-        SemaphoreGuard { guard: self.sem.access() }
+        SemaphoreGuard { _guard: self.sem.access() }
     }
 }
 
@@ -398,7 +398,7 @@ pub struct Mutex {
 /// corresponding mutex is also unlocked.
 #[must_use]
 pub struct MutexGuard<'a> {
-    guard: SemGuard<'a, Vec<WaitQueue>>,
+    _guard: SemGuard<'a, Vec<WaitQueue>>,
     /// Inner condition variable which is connected to the outer mutex, and can
     /// be used for atomic-unlock-and-deschedule.
     pub cond: Condvar<'a>,
@@ -421,7 +421,7 @@ impl Mutex {
     /// also be accessed through the returned guard.
     pub fn lock<'a>(&'a self) -> MutexGuard<'a> {
         let SemCondGuard { guard, cvar } = self.sem.access_cond();
-        MutexGuard { guard: guard, cond: cvar }
+        MutexGuard { _guard: guard, cond: cvar }
     }
 }