From 29ec2506abb1d382e432cae2519aa7b7695c276a Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 4 Jul 2014 00:56:57 -0700 Subject: librustc: Remove the `&LIFETIME EXPR` production from the language. This was parsed by the parser but completely ignored; not even stored in the AST! This breaks code that looks like: static X: &'static [u8] = &'static [1, 2, 3]; Change this code to the shorter: static X: &'static [u8] = &[1, 2, 3]; Closes #15312. [breaking-change] --- src/libstd/collections/hashmap.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/collections/hashmap.rs b/src/libstd/collections/hashmap.rs index 7c01a0342ed..098e87243b6 100644 --- a/src/libstd/collections/hashmap.rs +++ b/src/libstd/collections/hashmap.rs @@ -294,8 +294,7 @@ mod table { unsafe { debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET); - (&'a *self.keys.offset(idx), - &'a *self.vals.offset(idx)) + (&*self.keys.offset(idx), &*self.vals.offset(idx)) } } @@ -306,8 +305,7 @@ mod table { unsafe { debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET); - (&'a *self.keys.offset(idx), - &'a mut *self.vals.offset(idx)) + (&*self.keys.offset(idx), &mut *self.vals.offset(idx)) } } @@ -319,8 +317,7 @@ mod table { unsafe { debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET); (transmute(self.hashes.offset(idx)), - &'a mut *self.keys.offset(idx), - &'a mut *self.vals.offset(idx)) + &mut *self.keys.offset(idx), &mut *self.vals.offset(idx)) } } -- cgit 1.4.1-3-g733a5