1
Fork 0

Get rid of const eval_* and try_eval_* helpers

This commit is contained in:
Michael Goulet 2024-09-27 12:56:51 -04:00
parent a2a1206811
commit e83e4e8112
31 changed files with 119 additions and 172 deletions

View file

@ -406,7 +406,7 @@ impl<'tcx> Context for TablesWrapper<'tcx> {
let tcx = tables.tcx;
let mir_const = cnst.internal(&mut *tables, tcx);
mir_const
.try_eval_target_usize(tables.tcx, ParamEnv::empty())
.try_to_target_usize(tables.tcx)
.ok_or_else(|| Error::new(format!("Const `{cnst:?}` cannot be encoded as u64")))
}