Do not unnecessarily eval consts in codegen

This commit is contained in:
Michael Goulet 2024-09-20 20:38:11 -04:00
parent 37204ee563
commit 460abead20
4 changed files with 15 additions and 11 deletions

View file

@ -44,7 +44,7 @@ impl DebugContext {
type_dbg,
ty,
*elem_ty,
len.eval_target_usize(tcx, ty::ParamEnv::reveal_all()),
len.try_to_target_usize(tcx).expect("expected monomorphic const in codegen"),
),
// ty::Slice(_) | ty::Str
// ty::Dynamic