1
Fork 0

Avoid some tls::with calls.

These are in places where a `tcx` is easily obtained.
This commit is contained in:
Nicholas Nethercote 2023-02-09 10:51:29 +11:00
parent 18f751df6a
commit afbe167fbb
3 changed files with 8 additions and 11 deletions

View file

@ -54,7 +54,7 @@ fn eval_body_using_ecx<'mir, 'tcx>(
trace!(
"eval_body_using_ecx: pushing stack frame for global: {}{}",
with_no_trimmed_paths!(ty::tls::with(|tcx| tcx.def_path_str(cid.instance.def_id()))),
with_no_trimmed_paths!(ecx.tcx.def_path_str(cid.instance.def_id())),
cid.promoted.map_or_else(String::new, |p| format!("::promoted[{:?}]", p))
);