about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/lru_cache.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/collections/lru_cache.rs b/src/libstd/collections/lru_cache.rs
index 45e971a675f..32a16053fff 100644
--- a/src/libstd/collections/lru_cache.rs
+++ b/src/libstd/collections/lru_cache.rs
@@ -331,7 +331,8 @@ impl<K, V> Drop for LruCache<K, V> {
         unsafe {
             let node: Box<LruEntry<K, V>> = mem::transmute(self.head);
             // Prevent compiler from trying to drop the un-initialized field in the sigil node.
-            let box LruEntry { key: k, value: v, .. } = node;
+            let box internal_node = node;
+            let LruEntry { next: _, prev: _, key: k, value: v } = internal_node;
             mem::forget(k);
             mem::forget(v);
         }