File tree Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -485,7 +485,7 @@ impl<T:Freeze + Send> RWArc<T> {
485485 // Whatever region the input reference had, it will be safe to use
486486 // the same region for the output reference. (The only 'unsafe' part
487487 // of this cast is removing the mutability.)
488- let new_data = cast :: transmute_immut ( data) ;
488+ let new_data = data;
489489 // Downgrade ensured the token belonged to us. Just a sanity check.
490490 assert ! ( borrow:: ref_eq( & ( * state) . data, new_data) ) ;
491491 // Produce new token
Original file line number Diff line number Diff line change @@ -62,12 +62,6 @@ pub unsafe fn transmute<L, G>(thing: L) -> G {
6262#[ inline]
6363pub unsafe fn transmute_mut < ' a , T > ( ptr : & ' a T ) -> & ' a mut T { transmute ( ptr) }
6464
65- /// Coerce a mutable reference to be immutable.
66- #[ inline]
67- pub unsafe fn transmute_immut < ' a , T > ( ptr : & ' a mut T ) -> & ' a T {
68- transmute ( ptr)
69- }
70-
7165/// Coerce a borrowed pointer to have an arbitrary associated region.
7266#[ inline]
7367pub unsafe fn transmute_region < ' a , ' b , T > ( ptr : & ' a T ) -> & ' b T {
Original file line number Diff line number Diff line change @@ -420,7 +420,7 @@ impl<T:Send> Exclusive<T> {
420420
421421 #[ inline]
422422 pub unsafe fn with_imm < U > ( & self , f: |x: & T | -> U ) -> U {
423- self . with ( |x| f ( cast :: transmute_immut ( x ) ) )
423+ self . with ( |x| f ( x ) )
424424 }
425425
426426 #[ inline]
You can’t perform that action at this time.
0 commit comments