diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-02 12:16:41 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-02 13:51:50 -0800 |
| commit | 340f3fd7a909b30509a63916df06f2b885d113f7 (patch) | |
| tree | 344f3d621e187b41d23ef01f621ff68ebe810a03 /src/libstd/collections | |
| parent | 8cf9929a9a901b68d4624167542924e8b181e96a (diff) | |
| parent | 1abee08cbdbd62a83805aa5b5068df9e00471f06 (diff) | |
| download | rust-340f3fd7a909b30509a63916df06f2b885d113f7.tar.gz rust-340f3fd7a909b30509a63916df06f2b885d113f7.zip | |
rollup merge of #20410: japaric/assoc-types
Conflicts: src/liballoc/lib.rs src/libcollections/lib.rs src/libcollections/slice.rs src/libcore/ops.rs src/libcore/prelude.rs src/libcore/ptr.rs src/librustc/middle/traits/project.rs src/libstd/c_str.rs src/libstd/io/mem.rs src/libstd/io/mod.rs src/libstd/lib.rs src/libstd/path/posix.rs src/libstd/path/windows.rs src/libstd/prelude.rs src/libstd/rt/exclusive.rs src/libsyntax/lib.rs src/test/compile-fail/issue-18566.rs src/test/run-pass/deref-mut-on-ref.rs src/test/run-pass/deref-on-ref.rs src/test/run-pass/dst-deref-mut.rs src/test/run-pass/dst-deref.rs src/test/run-pass/fixup-deref-mut.rs src/test/run-pass/issue-13264.rs src/test/run-pass/overloaded-autoderef-indexing.rs
Diffstat (limited to 'src/libstd/collections')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 2 | ||||
| -rw-r--r-- | src/libstd/collections/hash/table.rs | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 4738c830bd3..d4fc4150fae 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -311,7 +311,7 @@ fn search_hashed<K, V, M, F>(table: M, hash: SafeHash, mut is_match: F) -> SearchResult<K, V, M> where - M: Deref<RawTable<K, V>>, + M: Deref<Target=RawTable<K, V>>, F: FnMut(&K) -> bool, { let size = table.size(); diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs index 6938ab9b0b6..a687ba3da8d 100644 --- a/src/libstd/collections/hash/table.rs +++ b/src/libstd/collections/hash/table.rs @@ -210,7 +210,7 @@ impl<K, V, M> Bucket<K, V, M> { } } -impl<K, V, M: Deref<RawTable<K, V>>> Bucket<K, V, M> { +impl<K, V, M: Deref<Target=RawTable<K, V>>> Bucket<K, V, M> { pub fn new(table: M, hash: SafeHash) -> Bucket<K, V, M> { Bucket::at_index(table, hash.inspect() as uint) } @@ -279,7 +279,7 @@ impl<K, V, M: Deref<RawTable<K, V>>> Bucket<K, V, M> { } } -impl<K, V, M: Deref<RawTable<K, V>>> EmptyBucket<K, V, M> { +impl<K, V, M: Deref<Target=RawTable<K, V>>> EmptyBucket<K, V, M> { #[inline] pub fn next(self) -> Bucket<K, V, M> { let mut bucket = self.into_bucket(); @@ -315,7 +315,7 @@ impl<K, V, M: Deref<RawTable<K, V>>> EmptyBucket<K, V, M> { } } -impl<K, V, M: DerefMut<RawTable<K, V>>> EmptyBucket<K, V, M> { +impl<K, V, M: Deref<Target=RawTable<K, V>> + DerefMut> EmptyBucket<K, V, M> { /// Puts given key and value pair, along with the key's hash, /// into this bucket in the hashtable. Note how `self` is 'moved' into /// this function, because this slot will no longer be empty when @@ -337,7 +337,7 @@ impl<K, V, M: DerefMut<RawTable<K, V>>> EmptyBucket<K, V, M> { } } -impl<K, V, M: Deref<RawTable<K, V>>> FullBucket<K, V, M> { +impl<K, V, M: Deref<Target=RawTable<K, V>>> FullBucket<K, V, M> { #[inline] pub fn next(self) -> Bucket<K, V, M> { let mut bucket = self.into_bucket(); @@ -384,7 +384,7 @@ impl<K, V, M: Deref<RawTable<K, V>>> FullBucket<K, V, M> { } } -impl<K, V, M: DerefMut<RawTable<K, V>>> FullBucket<K, V, M> { +impl<K, V, M: Deref<Target=RawTable<K, V>> + DerefMut> FullBucket<K, V, M> { /// Removes this bucket's key and value from the hashtable. /// /// This works similarly to `put`, building an `EmptyBucket` out of the @@ -428,7 +428,7 @@ impl<K, V, M: DerefMut<RawTable<K, V>>> FullBucket<K, V, M> { } } -impl<'t, K, V, M: Deref<RawTable<K, V>> + 't> FullBucket<K, V, M> { +impl<'t, K, V, M: Deref<Target=RawTable<K, V>> + 't> FullBucket<K, V, M> { /// Exchange a bucket state for immutable references into the table. /// Because the underlying reference to the table is also consumed, /// no further changes to the structure of the table are possible; @@ -442,7 +442,7 @@ impl<'t, K, V, M: Deref<RawTable<K, V>> + 't> FullBucket<K, V, M> { } } -impl<'t, K, V, M: DerefMut<RawTable<K, V>> + 't> FullBucket<K, V, M> { +impl<'t, K, V, M: Deref<Target=RawTable<K, V>> + DerefMut + 't> FullBucket<K, V, M> { /// This works similarly to `into_refs`, exchanging a bucket state /// for mutable references into the table. pub fn into_mut_refs(self) -> (&'t mut K, &'t mut V) { @@ -463,7 +463,7 @@ impl<K, V, M> BucketState<K, V, M> { } } -impl<K, V, M: Deref<RawTable<K, V>>> GapThenFull<K, V, M> { +impl<K, V, M: Deref<Target=RawTable<K, V>>> GapThenFull<K, V, M> { #[inline] pub fn full(&self) -> &FullBucket<K, V, M> { &self.full |
