@@ -155,13 +155,13 @@ pub fn pop<T: 'static>(key: Key<T>) -> Option<T> {
155
155
156
156
// Move `data` into transmute to get out the memory that it
157
157
// owns, we must free it manually later.
158
- let ( _vtable, box) : ( uint , ~~ T ) = unsafe {
158
+ let ( _vtable, box) : ( uint , ~T ) = unsafe {
159
159
cast:: transmute ( data)
160
160
} ;
161
161
162
162
// Now that we own `box`, we can just move out of it as we would
163
163
// with any other data.
164
- return Some ( * * box) ;
164
+ return Some ( * box) ;
165
165
}
166
166
_ => { }
167
167
}
@@ -244,13 +244,13 @@ fn get_with<T: 'static, U>(key: Key<T>,
244
244
want. describe( ) , cur. describe( ) ) ;
245
245
}
246
246
}
247
- // data was created with `~~ T as ~LocalData`, so we extract
248
- // pointer part of the trait, (as ~~ T), and then use
247
+ // data was created with `~T as ~LocalData`, so we extract
248
+ // pointer part of the trait, (as ~T), and then use
249
249
// compiler coercions to achieve a '&' pointer.
250
250
unsafe {
251
- match * cast:: transmute :: < & TLSValue , & ( uint , ~~ T ) > ( data) {
251
+ match * cast:: transmute :: < & TLSValue , & ( uint , ~T ) > ( data) {
252
252
( _vtable, ref box) => {
253
- let value: & T = * * box;
253
+ let value: & T = * box;
254
254
ret = f ( Some ( value) ) ;
255
255
}
256
256
}
@@ -294,9 +294,7 @@ pub fn set<T: 'static>(key: Key<T>, data: T) {
294
294
// everything to a trait (LocalData) which is then stored inside the map.
295
295
// Upon destruction of the map, all the objects will be destroyed and the
296
296
// traits have enough information about them to destroy themselves.
297
- //
298
- // FIXME(#7673): This should be "~data as ~LocalData" (only one sigil)
299
- let data = ~~data as ~LocalData : ;
297
+ let data = ~data as ~LocalData : ;
300
298
301
299
fn insertion_position ( map : & mut Map ,
302
300
key : * libc:: c_void ) -> Option < uint > {
0 commit comments