From 1384a43db3a8b1551bfc3c6feb37e2174d4c2ba0 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 24 Oct 2014 12:25:50 -0500 Subject: DSTify Hash - The signature of the `*_equiv` methods of `HashMap` and similar structures have changed, and now require one less level of indirection. Change your code from: ``` hashmap.find_equiv(&"Hello"); hashmap.find_equiv(&&[0u8, 1, 2]); ``` to: ``` hashmap.find_equiv("Hello"); hashmap.find_equiv(&[0u8, 1, 2]); ``` - The generic parameter `T` of the `Hasher::hash` method have become `Sized?`. Downstream code must add `Sized?` to that method in their implementations. For example: ``` impl Hasher for FnvHasher { fn hash>(&self, t: &T) -> u64 { /* .. */ } } ``` must be changed to: ``` impl Hasher for FnvHasher { fn hash>(&self, t: &T) -> u64 { /* .. */ } // ^^^^^^ } ``` [breaking-change] --- src/libsyntax/diagnostics/registry.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/diagnostics') diff --git a/src/libsyntax/diagnostics/registry.rs b/src/libsyntax/diagnostics/registry.rs index 7bc191df55a..71d82a41f38 100644 --- a/src/libsyntax/diagnostics/registry.rs +++ b/src/libsyntax/diagnostics/registry.rs @@ -20,6 +20,6 @@ impl Registry { } pub fn find_description(&self, code: &str) -> Option<&'static str> { - self.descriptions.find_equiv(&code).map(|desc| *desc) + self.descriptions.find_equiv(code).map(|desc| *desc) } } -- cgit 1.4.1-3-g733a5