Do not unnecessarily eval consts in codegen

This commit is contained in:
Michael Goulet
2024-09-20 20:38:11 -04:00
parent da889684c8
commit 914193c8f4
8 changed files with 30 additions and 19 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