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 34
34
#![ feature( get_mut_unchecked) ]
35
35
#![ feature( if_let_guard) ]
36
36
#![ feature( iter_from_generator) ]
37
+ #![ feature( local_key_cell_methods) ]
37
38
#![ feature( negative_impls) ]
38
39
#![ feature( never_type) ]
39
40
#![ feature( extern_types) ]
Original file line number Diff line number Diff line change @@ -89,9 +89,8 @@ mod tlv {
89
89
/// This is used to set the pointer to the new `ImplicitCtxt`.
90
90
#[ inline]
91
91
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) ) ;
95
94
f ( )
96
95
}
97
96
}
You can’t perform that action at this time.
0 commit comments