File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed
librustc_infer/infer/canonical Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -199,8 +199,8 @@ impl CanonicalizeRegionMode for CanonicalizeQueryResponse {
199199 // rust-lang/rust#57464: `impl Trait` can leak local
200200 // scopes (in manner violating typeck). Therefore, use
201201 // `delay_span_bug` to allow type error over an ICE.
202- ty:: tls:: with_context ( |c | {
203- c . tcx . sess . delay_span_bug (
202+ ty:: tls:: with ( |tcx | {
203+ tcx. sess . delay_span_bug (
204204 rustc_span:: DUMMY_SP ,
205205 & format ! ( "unexpected region in query response: `{:?}`" , r) ,
206206 ) ;
Original file line number Diff line number Diff line change @@ -242,9 +242,9 @@ impl From<ErrorHandled> for InterpErrorInfo<'_> {
242242
243243impl < ' tcx > From < InterpError < ' tcx > > for InterpErrorInfo < ' tcx > {
244244 fn from ( kind : InterpError < ' tcx > ) -> Self {
245- let capture_backtrace = tls:: with_context_opt ( |ctxt | {
246- if let Some ( ctxt ) = ctxt {
247- * Lock :: borrow ( & ctxt . tcx . sess . ctfe_backtrace )
245+ let capture_backtrace = tls:: with_opt ( |tcx | {
246+ if let Some ( tcx ) = tcx {
247+ * Lock :: borrow ( & tcx. sess . ctfe_backtrace )
248248 } else {
249249 CtfeBacktrace :: Disabled
250250 }
Original file line number Diff line number Diff line change @@ -22,9 +22,8 @@ pub unsafe fn handle_deadlock() {
2222 thread:: spawn ( move || {
2323 tls:: enter_context ( icx, |_| {
2424 rustc_ast:: attr:: SESSION_GLOBALS . set ( ast_session_globals, || {
25- rustc_span:: SESSION_GLOBALS . set ( span_session_globals, || {
26- tls:: with_context ( |icx| deadlock ( icx. tcx , & registry) )
27- } )
25+ rustc_span:: SESSION_GLOBALS
26+ . set ( span_session_globals, || tls:: with ( |tcx| deadlock ( tcx, & registry) ) )
2827 } ) ;
2928 } )
3029 } ) ;
You can’t perform that action at this time.
0 commit comments