File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
compiler/rustc_middle/src Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 3434#![ feature( get_mut_unchecked) ]
3535#![ feature( if_let_guard) ]
3636#![ feature( iter_from_generator) ]
37+ #![ feature( local_key_cell_methods) ]
3738#![ feature( negative_impls) ]
3839#![ feature( never_type) ]
3940#![ feature( extern_types) ]
Original file line number Diff line number Diff line change @@ -89,9 +89,8 @@ mod tlv {
8989 /// This is used to set the pointer to the new `ImplicitCtxt`.
9090 #[ inline]
9191 pub ( super ) fn with_tlv < F : FnOnce ( ) -> R , R > ( value : * const ( ) , f : F ) -> R {
92- let old = get_tlv ( ) ;
93- let _reset = rustc_data_structures:: OnDrop ( move || TLV . with ( |tlv| tlv. set ( old) ) ) ;
94- TLV . with ( |tlv| tlv. set ( value) ) ;
92+ let old = TLV . replace ( value) ;
93+ let _reset = rustc_data_structures:: OnDrop ( move || TLV . set ( old) ) ;
9594 f ( )
9695 }
9796}
You can’t perform that action at this time.
0 commit comments