diff options
| author | Michael Goulet <michael@errs.io> | 2024-09-20 20:38:11 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-09-20 20:38:11 -0400 |
| commit | 914193c8f40528fe82696e1054828de8c399882e (patch) | |
| tree | ef48c9e20d30d11fa4580da23e6153be56dac6e3 /compiler/rustc_codegen_ssa/src/debuginfo | |
| parent | da889684c80508036ff036db8c159ffdcf27648a (diff) | |
| download | rust-914193c8f40528fe82696e1054828de8c399882e.tar.gz rust-914193c8f40528fe82696e1054828de8c399882e.zip | |
Do not unnecessarily eval consts in codegen
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/debuginfo')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs index 55a71db9bae..369ab387bea 100644 --- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs +++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs @@ -188,7 +188,8 @@ fn push_debuginfo_type_name<'tcx>( _ => write!( output, ",{}>", - len.eval_target_usize(tcx, ty::ParamEnv::reveal_all()) + len.try_to_target_usize(tcx) + .expect("expected monomorphic const in codegen") ) .unwrap(), } @@ -200,7 +201,8 @@ fn push_debuginfo_type_name<'tcx>( _ => write!( output, "; {}]", - len.eval_target_usize(tcx, ty::ParamEnv::reveal_all()) + len.try_to_target_usize(tcx) + .expect("expected monomorphic const in codegen") ) .unwrap(), } |
