diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-02-09 10:51:29 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-02-09 15:28:04 +1100 |
| commit | afbe167fbb683fc1ed1c7577ab2eaa12cc44a6bf (patch) | |
| tree | ad32818d90f37017dc6bca3c39bea287c8b4c4af /compiler/rustc_const_eval/src/const_eval | |
| parent | 18f751df6adc6342ee0814dd6bc36bf867ff0029 (diff) | |
| download | rust-afbe167fbb683fc1ed1c7577ab2eaa12cc44a6bf.tar.gz rust-afbe167fbb683fc1ed1c7577ab2eaa12cc44a6bf.zip | |
Avoid some `tls::with` calls.
These are in places where a `tcx` is easily obtained.
Diffstat (limited to 'compiler/rustc_const_eval/src/const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/eval_queries.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs index 18e01567ca3..b4a49e1df61 100644 --- a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs +++ b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs @@ -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)) ); |
