Avoid some tls::with
calls.
These are in places where a `tcx` is easily obtained.
This commit is contained in:
parent
18f751df6a
commit
afbe167fbb
3 changed files with 8 additions and 11 deletions
|
@ -203,12 +203,10 @@ impl CanonicalizeMode for CanonicalizeQueryResponse {
|
|||
// rust-lang/rust#57464: `impl Trait` can leak local
|
||||
// scopes (in manner violating typeck). Therefore, use
|
||||
// `delay_span_bug` to allow type error over an ICE.
|
||||
ty::tls::with(|tcx| {
|
||||
tcx.sess.delay_span_bug(
|
||||
rustc_span::DUMMY_SP,
|
||||
&format!("unexpected region in query response: `{:?}`", r),
|
||||
);
|
||||
});
|
||||
canonicalizer.tcx.sess.delay_span_bug(
|
||||
rustc_span::DUMMY_SP,
|
||||
&format!("unexpected region in query response: `{:?}`", r),
|
||||
);
|
||||
r
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue