about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-11-07 11:31:25 +0000
committerbors <bors@rust-lang.org>2014-11-07 11:31:25 +0000
commit97a57ec909e61ecabadfce11fb9b36b2fe3783df (patch)
treeeb496871cde9494ec1a7900589b6ed1e36a22b7e /src/libstd
parent932eec7d702cf2cf55554e2431c3cb0fecd19014 (diff)
parentf2aaed8338d80afccd2159d9c819d8d0f300cb55 (diff)
downloadrust-97a57ec909e61ecabadfce11fb9b36b2fe3783df.tar.gz
rust-97a57ec909e61ecabadfce11fb9b36b2fe3783df.zip
auto merge of #18714 : nikomatsakis/rust/issue-18621-deref-for-refs, r=aturon
libs: add Deref, DerefMut impls for references, fixing a bug in compiler in the process that was blocking this.

r? @aturon 
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/table.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs
index 4d73029b7b0..fd964cdf02c 100644
--- a/src/libstd/collections/hash/table.rs
+++ b/src/libstd/collections/hash/table.rs
@@ -166,18 +166,22 @@ impl<K, V> RawBucket<K, V> {
 }
 
 // For parameterizing over mutability.
+
+#[cfg(stage0)]
 impl<'t, K, V> Deref<RawTable<K, V>> for &'t RawTable<K, V> {
     fn deref(&self) -> &RawTable<K, V> {
         &**self
     }
 }
 
+#[cfg(stage0)]
 impl<'t, K, V> Deref<RawTable<K, V>> for &'t mut RawTable<K, V> {
     fn deref(&self) -> &RawTable<K,V> {
         &**self
     }
 }
 
+#[cfg(stage0)]
 impl<'t, K, V> DerefMut<RawTable<K, V>> for &'t mut RawTable<K, V> {
     fn deref_mut(&mut self) -> &mut RawTable<K,V> {
         &mut **self