File tree 3 files changed +7
-8
lines changed
librustc_infer/infer/canonical
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 {
199
199
// rust-lang/rust#57464: `impl Trait` can leak local
200
200
// scopes (in manner violating typeck). Therefore, use
201
201
// `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 (
204
204
rustc_span:: DUMMY_SP ,
205
205
& format ! ( "unexpected region in query response: `{:?}`" , r) ,
206
206
) ;
Original file line number Diff line number Diff line change @@ -242,9 +242,9 @@ impl From<ErrorHandled> for InterpErrorInfo<'_> {
242
242
243
243
impl < ' tcx > From < InterpError < ' tcx > > for InterpErrorInfo < ' tcx > {
244
244
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 )
248
248
} else {
249
249
CtfeBacktrace :: Disabled
250
250
}
Original file line number Diff line number Diff line change @@ -22,9 +22,8 @@ pub unsafe fn handle_deadlock() {
22
22
thread:: spawn ( move || {
23
23
tls:: enter_context ( icx, |_| {
24
24
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) ) )
28
27
} ) ;
29
28
} )
30
29
} ) ;
You can’t perform that action at this time.
0 commit comments